Interacting with a shell prompt

I am using the following piece of code:
String command = ".. some unix command ..";
Process p = Runtime.getRuntime().exec(command);
BufferedReader buffIN = new BufferedReader(new InputStreamReader(p.getInputStream()));
int c;
while ((c = buffIN.read()) != -1) {
   System.out.write(c);
BufferedWriter buffOUT = new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
buffOUT.write(".. some interaction command ..");
int c2;
while ((c2 = buffIN.read()) != -1) {
   System.out.write(c2);
buffIN.close();With this code, I can invoke ".. some unix command ..", read the output from the shell, but I am unable to send command ".. some interaction command .." to the shell and make it effective.

You need to flush the data from the BufferdWriter, so the process will get it.
So try as follows:
buffOUT.write(".. some interaction command ..");
buffOUT.flush()

Similar Messages

  • Interacting with VBscript - Shell/GuiTree

    Hi all,
    I am experiencing problems to interact with a GuiTree. The Script Devolopment Tool i SAPGUI tells me:
    Type: GuiShell
    Name: shell
    SubType: Tree
    "/app/con[0]/ses[0]/wnd[0]/usr/ssubAREA05:SAPLCRM_CIC_NAV_AREA:0101/tabsTABSTRIP/tabpNA_TAB1/ssubSUB_TAB:SAPLCRM_CIC_NAV_AREA:0102/cntlNAV_CUST_CONT/shellcont/shell"
    I know there is alot of commands to interact with these GUITrees like:
    CollapseNode
    DoubleClickNode
    etc.
    But I havent figured it out how to use em on the info above that the script dev. tool gives me. Can anyone give me an example how to use it or a just a short explaination?
    I am very greatful for any help.
    Best Regards,
    Daniel Lindé

    I don't know exactly how to solve your problem, but here's a few things you can look at.
    1. You didn't say which computer you are on. At any rate, on Windows, you have to be careful and call the cmd.exe when you are trying to execute batch files (vs executing some other .exe).
    2. You MAY be in trouble from latex. This is an argument from analogy - a specific problem I ran into.
    I had a program written in C, which used lex/yacc. The input was read by lex. It turns out that the (Windows) implementation of lex - actually flex - used a function "isatty" to figure out whether to get input character-by-character or doing block reads. Well, when I used Runtime.exec, - for whatever reason - the C program got back a bad value, and bombed trying to read blocks of input.

  • "Suddenly" ssh connect won't return with a shell prompt

    Hi there!
    I'm really confused. We connecting over ssh to one of our Mac OS X Server 10.5.6 for month without problems. Right now we can't connect to the machine over ssh. AdminTool works, WebObjects works and so on (we don't have GUI access .
    I tried to connect over different client from different machines. I tried directly, and i tried over the VPN. It's everything the same. SCP works.
    It always stops at: *debug2: channel 0: open confirm rwindow 0 rmax 32768*
    Will a simple reboot help? (But how, without ssh :))

    Will a simple reboot help? (But how, without ssh )
    It might. You can issue a restart command through Server Monitor if you configured LOM properly, as I don't believe that it (Server Monitor) relies on ssh to issue commands.
    -Doug

  • Trouble with a tricky prompt mod.

    Hello genii
    I am trying to change my Terminal prompt as I had it in 10.3 where the standard user would be shown in green and if dropped down to root, that would be shown in red. I like that because the red is a good visual reminder of where you are. Example:
    Standard ~/Documents $
    root /etc #
    However, this only partly works in Leopard . I get the green username and the directory listing in the prompt alright, but when I change to root with sudo -s, it defaults to the original Leopard bash prompt of bash-3.2#
    Here is my bashrc script that worked well in Panther. The colour values are highlighted.
    # System-wide .bashrc file for interactive bash(1) shells.
    PS1='\h:\w \u\$ '
    if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ] && [ -n "$PS1" ]
    then
    if [ "$whoami" = 'root' ]
    then
    PS1='\[\033[22;31m\]\u \[\033[22;34m\]\w \$ \[\033[00m\]'
    else
    PS1='\[\033[22;32m\]\u \[\033[22;34m\]\w \$ \[\033[00m\]'
    fi
    fi
    # Make bash check it's window size after a process completes
    shopt -s checkwinsize
    Notes: both if statements have '['square brackets']' around them but they got lost in the format.
    Also, lines System-wide... and Make bash check... are commented lines that got lost too.
    I have been trying so many things, but frustratingly to no avail. I also made a ~ .bash_profile, with bashrc back to orig. and it behaves the same, giving me the green standard user, but fails to process root. After each change I close Terminal and re-open it as I think that is needed.
    I am at this stage willing to abandon such a fancy prompt and settle for just the 'else' format as a one line unconditional, and doing so does indeed give me the user as root, but in green not red. Maybe that is the best I can hope for, - just thought maybe I'm missing something, or maybe it is Leopard!
    Any thoughts?
    Here is a better view of the script.
    http://farm4.static.flickr.com/3192/2523920928de4b7398d5o.png
    Message was edited by: roam2

    roam2 wrote:
    I don't know about Tiger; jumped from Panther to Leopard.
    What you said made sense. I tried deleting those entries, (now edited) but it was still the same.
    Sorry. I realised I had gotten confused as soon as I'd posted it and tried to delete the irrelevant bits. (For some reason, I got it into my head that "-n" was checking that the variable was not set as opposed to being of non-zero length which meant everything was the opposite way around.)
    sudo su does give a different prompt
    sh-3.2#
    but remains unaffected by the bashrc script.
    Huh. What if you copy /etc/bashrc to /var/root/.bashrc and/or /var/root/.bash_profile? (I think you need the latter or to edit /etc/profile - see below.)
    It seems to me as if sudo in Tiger is not using the defaults as given in the manual page. I'm almost sure this is a sudo thing rather than a bash thing...
    sudo -s
    echo $PS1
    ->
    echo $HOME
    -> /Users/myusername
    whoami
    -> root
    groups
    -> wheel daemon kmem sys tty certusers operator admin staff
    touch b
    ls -al b
    -> -rw-r--r-- 1 root myusername 0B May 27 13:45 b
    This strikes me as weird. Should be different on Leopard because default groups are different so it likely won't give such a very odd result.
    Have you tried sudo -i? (Note: I think this probably has the same effect as sudo su.)
    I don't know if this applies to you but, for me, this means it really matters a great deal how I get a root shell in ways that are not obvious just from looking at the screen. For example, rm is an alias for rm -i in the root shell on my machine but not otherwise. If I get the shell using sudo -s, rm has its ordinary meaning.
    The reason you don't get the expected prompt with sudo su is, I suspect, because you are not getting a bash shell. The default root shell is invoked instead and this is probably /bin/sh rather than /bin/bash. On my machine, /etc/bashrc is still read and I'm wondering if the reason it doesn't get read on yours is because the contents of /etc/profile is different. When invoked as sh, bash doesn't read /etc/bashrc. On my machine it does this only because /etc/profile explicitly sources it. I'm not sure if this is because I edited it (usually I'd have a record of this, but it is certainly possible I forgot to make one). It could also be a difference between Tiger and Leopard. Do you have the lines
    if [ "${BASH-no}" != "no" ]; then
    [ -r /etc/bashrc ] && . /etc/bashrc
    fi
    in /etc/profile? If not, you could either edit profile to add these lines or change the prompt directly in profile, or you could change root's default login shell if you wanted it to be bash. (I think there may be good reasons not to do this, though.)
    Or I could be even more confused now than before...
    - cfr

  • [SOLVED] Xmonad and shell prompts

    Hi
    Is it possible to make this prompt/shell support pasting commands? I can only interact with it using the keyboard. Thanks
    -- Prompts
    import XMonad.Prompt
    import XMonad.Prompt.Shell
    myXPConfig :: XPConfig
    myXPConfig = defaultXPConfig
    { font = myDroidFont
    , bgColor = myColorGrayBg
    , fgColor = myColorBlue
    , bgHLight = myColorBlue
    , fgHLight = myColorWhite
    , promptBorderWidth = 0
    , position = Bottom
    , height = 16
    , historySize = 100
    , historyFilter = deleteConsecutive
    Last edited by valvet (2010-11-09 22:08:30)

    brisbin33 wrote:
    How are you pasting? Have you tried S-insert or middle click?
    If it's true that the prompt does not support pasting of any sort, then your config will be irrelevant and the fix/change will almost certainly have to occur in the X.Prompt internals.
    Hi
    Yes, I tried both. Moving the cursor over the prompt window, it has no "edit" cursor, as in a terminal. Shift insert is the same result.
    Well, OK - but would be a nice feature :-). I'll play with it.
    Thanks

  • Visual Studio 2012 is no longer able to interact with any TFS server

    I can connect to the on-premise TFS2012 server using the instance of VS2012 installed on the server machine as well as the instance of VS2012 installed on a coworker's machine.
    I was able to interact with TFS2012 using the instance of VS2012 installed on my Win7 x64 machine, but only one time. Many reboots later, both of the server itself and my machine, I haven't been able to get VS2012 to interact properly with TFS.
    When I click on "Team" and select "Connect to Team Foundation Server", the "Team Explorer" VS window opens. In that window, no matter what button or link I click on, Visual
    Studio won't connect to TFS or allow me to choose a TFS server.
    1. Clicking on the Home icon takes me to page with two buttons: Pending Changes & settings.
    Clicking on "Pending Changes" takes me to a page where I can do 3 things: click on "no workspace" (nothing happens), click on Actions -> Open Source Control Explorer (which opens an
    empty Source Control Explorer Window, from which I can do nothing), click on "Settings", which shows me a page with 4 options:
    Security: clicking it results in the message "Team Foundation Error. Object reference not set to an instance of an object"
    Group Membership: clicking it results in the message "Team Foundation Error. Object reference not set to an instance of an object"
    Source Control: clicking it results in the message "Value cannot be null. Parameter name: serverName"
    Process Template Manager: clicking it results in the message "Value cannot be null: Parameter name: tpc"
    2. Clicking on the "Connect to Team Projects" icon takes me to a page where I can click on either:
    "Configure Team Projects": clicking it does nothing
    "Connect": clicking it does nothing
    "Sign Up": opens a Visual Studio Online page on my web browser
    If I instead go to File -> Source Control -> Advanced, there is only one option which appears to be working:
    Change Source Control. When I click on it I get a window with a table with rows that correspond to the current solution and the projects in the current solution. ie:
    Solution/Project: {item name}
    Server Name: "<No Server>"
    Server Binding: "<No Server>"
    Connected: {gray uncheckable checkbox}
    Status: "Not Controlled"
    Local Binding:
    Provider:
    Relative path:
    The buttons "Connect", "Disconnect", "Browse" are disabled. Clicking on the "Bind" button results in a window with the message "The mappings
    for the solution could not be found" and two buttons: Ok and
    Help. Clicking on Help results in a white window with the message:
    "The 'EurekaPackage' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\User\<username>\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml'.
    Continue to show this error message?"
    Clicking "yes" open the following page on my web browser, which essentially tells me to go back to the "Change Source Control" window and unbind the project, which VS is not letting me do:
    http://msdn.microsoft.com/query/dev11.query?appId=Dev11IDEF1&l=EN-US&k=k%28vs.tfc.sourcecontrol.MessageConnectionManagerCantBind%29;k%28TargetFrameworkMoniker-.NETFramework
    The following is an excerpt from the "ActivityLog.xml" file mentioned in the white window that appeared when I clicked on the "Help" button:
      <entry>
        <record>651</record>
        <time>2013/12/20 13:35:53.354</time>
        <type>Information</type>
        <source>Profile manager</source>
        <description>Begin export of category &apos;Source Control_TeamFoundation&apos; ({2A718788-A6D9-44C5-90EF-438BF5B06A74}) from package &apos;Microsoft.VisualStudio.TeamFoundation.VersionControl.HatPackage, Microsoft.VisualStudio.TeamFoundation.VersionControl, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; ({4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}).  3349472 KB of virtual memory currently available.</description>
      </entry>  <entry>
        <record>652</record>
        <time>2013/12/20 13:35:53.354</time>
        <type>Information</type>
        <source>Profile manager</source>
        <description>End export of category &apos;Source Control_TeamFoundation&apos; ({2A718788-A6D9-44C5-90EF-438BF5B06A74}).  3349472 KB of virtual memory currently available.</description>
      </entry>
      <entry> <entry>
    <record>664</record>
    <time>2013/12/20 13:48:51.961</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>CreateInstance failed for package [Microsoft.Data.Entity.Design.BootstrapPackage.BootstrapPackage, Microsoft.Data.Entity.Design.BootstrapPackage, version=11.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]</description>
    <guid>{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}</guid>
    <hr>80070002</hr>
    <errorinfo>Could not load file or assembly 'Microsoft.Data.Entity.Design.BootstrapPackage, Version=11.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</errorinfo>
    </entry>
    <entry>
    <record>671</record>
    <time>2013/12/20 13:50:19.757</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
    <guid>{E8B06F41-6D01-11D2-AA7D-00C04F990343}</guid>
    </entry>
    <entry>
    <record>672</record>
    <time>2013/12/20 13:50:19.757</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Unexpected system error mode before loading package [Visual Studio Web Browser Package]</description>
    <guid>{E8B06F41-6D01-11D2-AA7D-00C04F990343}</guid>
    </entry>
    <entry>
    <record>676</record>
    <time>2013/12/20 13:50:19.820</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
    <guid>{8C28E535-ABC9-4F92-B5C9-6C16617C8884}</guid>
    </entry>
    <entry>
    <record>677</record>
    <time>2013/12/20 13:50:19.820</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Unexpected system error mode before loading package [EurekaPackage]</description>
    <guid>{8C28E535-ABC9-4F92-B5C9-6C16617C8884}</guid>
    </entry>
    <entry>
    <entry>
    <record>679</record>
    <time>2013/12/20 13:50:19.820</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>CreateInstance failed for package [EurekaPackage]</description>
    <guid>{8C28E535-ABC9-4F92-B5C9-6C16617C8884}</guid>
    <hr>80070002</hr>
    <errorinfo>Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Web Tools\Eureka\Microsoft.VisualStudio.Web.Eureka.dll' or one of its dependencies. The system cannot find the file specified.</errorinfo>
    </entry>
      <entry>
        <record>559</record>
        <time>2013/12/20 14:30:48.880</time>
        <type>Error</type>
        <source>VisualStudio</source>
        <description>Could not convert file time to system time</description>
        <hr>80070057 - E_INVALIDARG</hr>
      </entry>
    </activity>
    What, if anything, can I do in order to be able to get Visual Studio 2012 to interact with TFS?

    I'll add that when I run devenv.exe with the flag /TFSLink, VS opens a Team Explorer window that contains the following text:
    An exception was encountered while constructing the content of this frame. This information is also logged in "C:\Users\<username>\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml".Exception details:System.NullReferenceException: Object reference not set to an instance of an object.   at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid& context)   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()

  • Problem with passing dashboard prompts

    Hi All,
    I have a problem with passing dashboard prompts.
    Scenario:
    I have a report with country(column interaction),amount sold and two prompts.when the user selects the particular country, i need to navigate to other detailed dasboard with 2 prompts and country.
    with the column interaction, am able to navigate to other dashboard with all the prompts only when the target dashboard prompts, defaults to presentation variable.
    but when the user directly opens the target dashboard, i have to display the report with the default values which am not able to achieve.
    All the prompts are customized prompts.
    Any suggestions would be greatly helpful.
    Thnx in Advance

    Hi,
    When you drill down, corresponding filter values get added to your report. So next time when you change the prompt values It does not give you proper data.
    So before you change the prompt values, you comeback to the default report. and try changing the prompt values.
    Otherwise you can do one thing, Do not enable drill in place for the report section. So when you try to drill down in the report, it takes you to the new page.
    And in the main page even if you change prompt values, It will work perfectly.
    Regards,
    TKB

  • Interaction with MS DOS-program

    I try to interact with a MS DOS-program.
    I try something like this:
    // start command running
    startCmd = "start command";
    Process proc = Runtime.getRuntime().exec(startCmd);
    istr = proc.getInputStream();
    BufferedReader br = new BufferedReader(new InputStreamReader(istr));           
    printCmdLine(br);
    out = proc.getOutputStream();
    writer = new BufferedWriter(new OutputStreamWriter(out));
    writer.write("second command");
    writer.newLine();
    writer.flush();
    printCmdLine(br);
    writer.write("third command");
    writer.newLine();
    writer.flush();                     
    printCmdLine(br);
    // wait for command to terminate
    try {
         proc.waitFor();
    catch (InterruptedException e) {
         System.err.println("process was interrupted");
    // check its exit value
    if (proc.exitValue() != 0)
         System.err.println("exit value was non-zero");
    The problem is that I can't read from the InputStream:
    private static void printCmdLine(BufferedReader br) throws IOException {
         ArrayList list = new ArrayList();
         String outlist[];
         String str = br.readLine();
    The program can't read. The DOS prompt waits for an input from the keyboard and nothing more happens. If I don't try to read from the InputStream, the program hangs when it comes to proc.waitFor(); - The DOS prompt waits for an input from the keyboard. I can't achieve this by using a batch file either. Anyone knows how to do this?

    1. Buffered reader/writer might not be so good an idea; use the constructor with boolean flush.
    2. It might be, that you need to read from the MSDOS program's STDERR, the "error" InputStream. This can be tested in MSDOS by appending to the command-line (NT/2000) greater-than-out.txt and 2-greater-than-err.txt.

  • User interaction with jdeveloper

    Hi, I am new to jdeveloper and have a couple of relatively simple programs up and running on it. Other than from the command line is there a way a user can interact with a basic program where the program prompts the user for input. I have used Jbuilder before and with JBuilder once you run your program the user can input required details in the debug window

    Hi Joe,
    Before you start running (or debugging, profiling, or code-coaching), you need to check a box in the project settings dialog. In the Project Settings dialog, select Runner - Options on the left and then check the "Allow Program Input" check box (at the bottom of the panel).
    When you start running (etc), the log window will contain a text field labeled "Input:" where you can enter program input (it's at the bottom of the log window). When you enter input, press "Enter" to send the text to the running program.
    -Liz

  • Interacting with stdin/stdout of linux

    Dear all,
    I'm trying to write some java program in Linux. And what I want to do is to interact with some standard Linux command, such as the "passwd".
    As it will prompt me for the old password and then the new password twice, is there any way in Java that I can interact with the program? Just like the "expect" under Linux?

    Nope but you can do something like this
    class PPP {
        public native void PW();
        static {
            System.loadLibrary("pass");
        public static void main(String[] args) {
           PPP p = new PPP()
             p.PW();
    #include <jni.h>
    #include "PPP.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL
    Java_PPP_PW(JNIEnv *env, jobject obj)
        system("passwd");
        return;
    }http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/index.html

  • Running odihragent from shell prompt

    Hi
    I am currently trying to run odihragent from a shell prompt to do some debugging however I am not sure of the date format that it expects? Can anybody help?
    /oracle/10gASR2/ldap/odi/bin/odihragent OracleHRAgent connect=find login=apps pass=*** date=200501011200
    status= -1
    Error - ORA-01722: invalid number
    Error in OCIStmtExecute
    Error in Execute
    HR Agent failed with Status:2

    well, the problem is not with the command line arguments. it doesnt matter if we get the input from the user through command prompt or GUI. The problem is only in the handling of the change in exitValue during running.

  • Can the 7970 interact with MeetingPlace without PhoneView?

    Greetings!
    I have a quick question regarding Cisco's MeetingPlace and PhoneView.
    The phone types being used:  Cisco 7970 series phone.
    Call Manager:  Cisco Unified Communications Manager Express Ver 8.0
    I have read that the CUCME does not support MeetingPlace PhoneView.  I understand that part.
    Would this prevent us from dialing into and interacting with the MeetingPlace at another location?
    For instance:  We can dial into the MeetingPlace just fine.  When the recording prompts us to make a selection however, our keyed selections are not detected.
    Is the lack of MeetingPlace PhoneView on our CUCME the cause of this issue or is there something else I'm missing?
    Thank you in advance!

    The only way to purchase from the iTunes Store is via iTunes, on a computer or iOS device, and it will automatically download your purchase immediately. You have a couple of options: you can go ahead and purchase on another computer that has iTunes and then just copy the purchases to your Vista system (via any normal means of file transfer), or if you're in the US, the new iTunes in the Cloud feature, currently in beta and so not completely reliable, would allow you to download the purchases again at some future time when you get your iTunes problems sorted out. I'd recommend the first option as the best solution for now (and the only solution if you're not in the US).
    Regards.

  • HT4907 I am able to connect to my Mac Mini on Back to My Mac through iCloud but the keyboard/trackpad on the MBAir or MBP with which I access does not register on the Mini.  So I can see the screen but cannot interact with it. Mini works accessing MBP/Air

    I am able to connect to my Mac Mini on Back to My Mac through iCloud but the keyboard/trackpad on the MBAir or MBP with which I access does not register on the Mini.  So I can see the screen but cannot interact with it. Mini works accessing MBP/Air and I can use Mini to input data or interact with screens of those computers.

    Regarding your first question about bookmarks, I think you discovered the answer in when you pressed the address bar. The second tab there has your bookmarks.
    As for the keyboard, I'm not sure why your Firefox is reacting so slowly; mine seems to show keyboards even when I don't want them. If you have accumulated a lot of history, perhaps that's an issue?
    Did you use any third party software to move your Firefox data from internal memory to the storage card?

  • I am having much trouble with the new reminders in IOS7 and how it interacts with Outlook Exchange. Many features lost in the new version.

    When I downloaded IOS7, I found that the reminders/task app and how it interacts with Outlook Exchange is much more difficult to use. Some of the issues that I am having are...
    1. Trying to edit my task on my phone is not possible, if the notes are lengthy. When you click on the text to edit data near the top, it will scroll to the bottom and not allow you to edit the text because you cant see it.
    2. Now all of my task are in one long list. I can not move from day to day like we could in previous version IOS6
    3. When I do edit a short task reminder and click done, it crashes and completly goes away. It does save the edit though
    4. You can only add task at the bottom of each days reminders. This is very inconvient and much more difficult than IOS6
    5. There is a major delay or latency when interacting inside of reminders in this version. Much more than IOS6. It is very unstable and quirky.
    I have never seen Apple take a step back with a product until now. I am a huge Apple fan and always will be, so I am hoping they make enhancements to fix these issue. It is a big time prodcutivity killer.
    Thanks for any and all help you can give.
    Troy Meachum

    Some power supplies or designed so that if there is a short or overload they shut them selfs off and some will not turn back on. Some have a relay that will click back on and work, some you have to  cycle the power switch. Those that won't come back on will have to be replaced. I'm not saying that yours is that type as I have no way of telling. But if you have a friend who will loan you a good power supply you might try it. As someone else said just turning off the power will not darn all the power from some motherboards. To test this turn off your power supply than turn on the computer with the start botton. Mine will flash the lights and fans will start to spin than die. So every time you turn off computer to work on it. After turning off PSU hit the start botton to drian any power left in it before working on it. Also do this after unplugging it just to make sure.

  • Display and interact with a vi front panel on remote C++ app

    Hello:
    I am new to LV and need a little advice.  I need to display a LabVIEW VI front panel in my C++ .Net application that users can interact with to view real-time spectrum data.  The C++ app (client) must reside on a separate computer(s) from the VI so that the client can connect from anywhere around the world and interact with the VI. 
    I am not sure about the basic architecture that should accompany a good solution.  We want to use TCP/IP but not DataSocket.  I do not have access to Measurement Studio but I do have access to LabVIEW Professional Development System v 8.2.  Can anyone provide suggestions on what I need to do in order to
    1.  Connect to my TCP server using my C++ client app - I have already written TCP client and server code which communicate but now I need to integrate LV
    2.  Get access to the VI sitting on that server
    3.  Send the VI front panel to the client for display
    4.  Allow the user to modify parameters on the front panel displayed on the C++ client, send those changes back to the server, and refresh the front panel displayed in the C++ client given the new parameters (I would like a real-time display of the spectrum to always be available)
    Is this possible?  Has anyone done this using C++ .NET in VS2005?  Are there examples I can mimic or references that will help direct me?  I have searched and searched through NI's help and found a lot of good stuff but I'm still feeling confused about the best way to utilize LV.
    Thank you in advance!

    One more question ... what if I could use Measurement Studio?  The documentation seems to indicate that it's easy to create network applications and therefore it would be easy for me to re-create our VI's front panel using Measurement Studio components in my C++ app and then simply connect those components to the networked hardware (TCP/IP or DataSocket) that could be located anywhere in the world.
    Depending on what components you are using in your LabVIEW panel, it is probably pretty easy to build a Measurment Studio application to look like a LV panel.
    Given that, you could use network shared variables to move data across the network, no TCP programming necessary -- I think that this is pretty easy to do, but I don't know the specifics about variable programming in that environment.  Also, you will probably need to add some smarts to the server side to make sure that it is reading to and writing from variables in an appropriate manner.
    Question: why can't you just use LabVIEW for the client application also?

Maybe you are looking for

  • HT1338 I installed Mac OSX Snow Leopard 10.6.3 And now my Java is not working, what can I do to fix's this?

    I installed Mac OSX Snow Leopard 10.6.3 And now my Java is not working,what can I do to fix's this?

  • Data recovery itunes

    My Ipod broke, so i got a new one. But before I could load my library into the new Ipod, my external hard drive broke - stopped spinning. I had all my itune files on the external only. Now, I'm looking for a way to recover my itunes library (without

  • Help for a newbie using the SAP tutorial

    Hi All, This is the first time i have picked up the SAP SDK and I am following the tutorial that is in the the help document that is installed with the SDK installation.  Under the developers guide section > Tutorial: Blanket Agreement Solution I hav

  • Please help!! update fields of delivery order by using BAPI.

    hi, any one can help me to update the fields of a delivery order. the fields in the delevery order are : Batch no. quantity. and Stock location. i cannot use any BDC to do that, BAPI is prefered in that report. batch number and quantity are easy to f

  • Import problems iPhone 4 to iPhoto 6

    Hey there, Have a new iPhone and am trying to import photos and video I've taken. At first, iPhoto 6 was happy to import both photos and video, then it decided not to, then yes, then no... All these files have been taken on the iPhone camera, so I do