Goto command in LabVIEW

Hi
I was wondering if there's anything like a "goto" command in labview. For example, if I am in a for loop (and the for loop hasn't reached it's number of time to loop yet) and need to exit the loop and jump to somewhere else in a code because I encounter some error condition. I know I can use a while loop for this if there isn't any goto command, but that's my last choice because it's kinda complicated for a nested loop with many procedures.
Thanks

I too would like to find a way to mimic a "goto" function. 
In my program, I have a VI that determines if temperature (T1) is stable to within a certain limit for a certain amount of time. After I've found that it's stable, I need to check if another temperature (T2) is within a certain range of a set temp. If it's not, I need to raise T1 so that T2 will also rise to be within range. Then I need to use the aforementioned VI again to check when T1 is stable again. I wish I could just do something like loop the error cluster wire back on itself, making a sort of "goto" command. Otherwise I need to make a very complicated nested While Loop structure. Perhaps I can figure something out with an Event List. Anyone got any suggestions?

Similar Messages

  • Using SQLplus command in LabView Database toolkit

    Hi ,
    I would like to ask something but before that this is my set up background
    OS          : Win 7,
    LabVIEW : 2012
    I have successfully connected with Oracle database using Labview Database toolkit.
    The problem now is since I need to query the data from the database,
    it will takes time for the labview to process it (since there is so much data in a specific table),
    let say that the table in database is "Serial Number", and the data that I want from that table is "SN123"
    if I query the data from that table, the labview will process it in a long time since it will not only give me "SN123" but also other data inside the "Serial Number" table.
    (Refer to attachment)
    but if in SQLplus, there is a command that can be execute to specifically call the "SN123" data,
    For the SQLplus, the steps to retrieve the data is like this:
    1. Key in the command to get the ID of the "SN123"
    2. Key in the command "SN123" ID to retrieve the data.
    I wonder if there is a way to put this command on labview database so it will be faster to retrieve the data.
    Attachments:
    Database.png ‏84 KB

    An  instrument driver written in Labview, is not the same as a instrument driver used by say Windows. A Labview instrument driver uses standard Labview functions to send SCPI commands to the instrument. You can learn a lot about the instrument by looking into the Labview instrument driver, and how it sends the commands to the instrument. But having the instrument programming manual at hands is also important.
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Run ssh command in labview

    does anyone knows how to run an ssh command in labview?
    I know how to run some linux commands in labview but my problem is when I try to run an ssh command ...
    thks
    JP

    Unfortunetly, I don't know how to script in a password for ssh. SSH closes the stdin and re-opens the tty that you are logged in at. This is actually a security feature. As well as a way to send stdin to remote programs (otherwise your password would get in the way.)
    If you don't need to ssh to a remote host, and you want to chmod something on the localhost, you could use sudo instead. With sudo you can specify certain users (or all users) to run certain commands. (so you could make a shell script to chmod for you).
    I don't know your exact needs, but I think that a public/private keypair could still work. In your authorized keys file on your "root" account, you can even specify that "this public key does not get shell access, and can only execu
    te this one command." This would probably be the most secure method. But it requires the user to have the correct private key as well.
    If you know that won't work for some reason, then maybe you could setup a inetd process that will execute a command whenever someone connects to a certain port (then you could use LabVIEW's TCP VIs).
    Or, if you are not connecting remotely, you could setuid your LabVIEW executable (A VERY BAD IDEA!).
    Also, it is possible to script "telnet." It would of course transmit your root password as plaintext, but trying to script your ssh session would also embed your password in your LabVIEW VI. Out internet toolkit for LabVIEW has some helpful telnet VIs.
    May I ask why you want to chmod something on a remote system that requires root? Sounds like maybe you should create a LabVIEW application on the remote side that acts as a daemon (running as root) and accepts connections and commands and does the chmodding for you.
    -Duffey

  • Wonky CS4 goto commands with Windows 7.0

    I have a big problem I'm hoping someone can help me with.  I've been using Flash CS4 with ActionScript 3.0.  They just upgraded my computer from a Windows XP to a Windows Professional 7.0 system.  On the new system, whenever I compile an SWF (select Test Movie or hit ctrl enter),  the goto commands go wonky.  The goto commands work fine with any old SWFs that were compiled with the old system, but not with any SWFs created with the new system.  When I add a listener to a button, sometimes it works, sometimes not.  The button simply goes dead, nothing happens when it’s clicked.   When I add a goto command to the timeline within an IF command, the playback stalls.  I’m hoping someone is familiar with this problem.  Maybe there’s a plugin I can download that will fix an incompatibility with Windows 7.0. 
    Here’s the script I use to program my buttons.  This programs a back button called “BTN_BACK” to send the timeline to a previous frame labeled “LASTFRAME.”  Again, this worked fine with Windows XP system, but not with 7.0
    BTN_BACK.addEventListener(MouseEvent.CLICK, BACK);  
    function BACK (event:MouseEvent):void
    {              SoundMixer.stopAll();
                    event.stopPropagation();
                    gotoAndStop("LASTFRAME ", "SCENE");

    uninstall and then re-install flash pro.  you don't have to uninstall your settings.

  • Goto Command?

    i just started programing in java, I have previously used other programing languages and there was a way to jump around your code in those but it doesn't seem to work in java. Is there a type of "Goto" command in java that will let you skip to a certain part of the code? If there is please tell me how.
    Example:
    Start:
    System.out.print("Hello!");
    Goto Start;
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Thats how it was done with the old programing language I used does anyone know how to do the same type of thing using java?

    Methods & loops.
    When you post code, please use[code] and [/code] tags as described in Formatting Help on the message entry page. It makes it much easier to read.
    Resources for Beginners
    Sun's basic Java tutorial
    Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's Thinking in Java (Available online.)
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java. This one has been getting a lot of very positive comments lately.

  • Execute system commands from LabVIEW

    Hi,
    can anybody please help me with how to execute sytem commands from labview
    (WIn98 in particular).
    Basically I would like to execute the command "javac example.java"
    Looking forward to responses.
    Please be kind enough to send me a email also
    manjul [email protected]

    Oops. Looks like I lost the attachment on the way. Sorry... Here it comes
    Attachments:
    Command_Execution.vi ‏21 KB

  • Create a Next-button with a goto-command?

    Hello,
    was wondering if it is possible to create a Next button with a goto-command, similar to this "back"-button: goto://FolioNavigation/lastview   ?
    Tim

    Hi Bob,
    thank you for the answer Yes, you understood it right. I am making an app similar to a website experience (DPS is probably not really the best thing for it, just very practical to use since it's in Indesign). I guess I will have to work around it Thanks again!

  • AT commands in labview

    Hi,
    I am using a maxon modmax modem.
    Using window hyperterminal I can send commands to the modem - for example ATE1 turns echo on, ATI returns modem serial number.
    When I send data to the modem in Labview I get a timeout error?
    In windows hyperterminal when you type for example "ATE1" enter -  sends a text string "ATE1?????".
    Can anybody tell me what the ???? are AND what text string I need to send in Labview to mimic the ATE1 command.
    Thanks for your help.

    Hi Mark,
    I assume that the wait VI is used to be certain that the AT-command has been sent and received, correct? The way you have written your code now, you generate one command, waits, and then generate another one, the delay will not have any effect when you send it. If you want to do several serial writes with a delay in between each AT-command, you must call the VISA write VI several times (now you only write once). Some sort of loop is needed, if it's a while or for loop could depend on the purpose of the VI. If you only want to send all the commands and that's it, I would go for a for-loop like in the figure:
    If you continuously want to write/read then a while loop would be necessary.
    Also, you need to control the dataflow in your VI, you can turn on Highlight Execution to see how your code is executing at the moment. When you run it, you can see that the local variable "output string to write" is sent to the VISA Write VI before the string has been generated in the for loop. By using local variables you don't get the same predictable dataflow as with wires and there is no need for a local variable in this VI, everything can be done via wires. There are lots of pages about Labview dataflow, just search at NI to get started.
    Hope this help!
    /Anders

  • Using SCPI command in labview

    Hi.
    I've found an instrument driver for keithley 6221 on keithley.com.
    Here is a question: I wana to control this model directly by using SCPI command instead of instrument driver. But,  I don't know how can I do this in Labview 8.0.
    Tnx.

    An  instrument driver written in Labview, is not the same as a instrument driver used by say Windows. A Labview instrument driver uses standard Labview functions to send SCPI commands to the instrument. You can learn a lot about the instrument by looking into the Labview instrument driver, and how it sends the commands to the instrument. But having the instrument programming manual at hands is also important.
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Instrument I/O Assistant (sending command from labview to arduino)

    Hi,
    I am a beginner in Labview. I would like to control the intensity of AC loads using labview. In this case, i would prefer to use instrument I/O assistant. The instrument I/O assistant in labview will have to send a command to Arduino. The intensity will be controlling by using slider in labview. How to write the vi for this example? Please advice.

    feliciacpw92 wrote:
    Hi,
    I am a beginner in Labview. I would like to control the intensity of AC loads using labview. In this case, i would prefer to use instrument I/O assistant. The instrument I/O assistant in labview will have to send a command to Arduino. The intensity will be controlling by using slider in labview. How to write the vi for this example? Please advice.
    In the thread for your other post, you were told that LabVIEW installs by default example programs on how to use LabVIEW with serial port.
    Have you bothered looking at that?
    You need to do some work on your own.

  • Run a cmd command in LabVIEW with parameters

    I have an executable program, for example myprogram.exe, located in "C:\Documents and Settings\myname\myprogram.exe" (I use windows xp 32 bit)
    When I run the program (by running cmd and type "myprogram.exe > to_text.txt" on the command line), the program will print out the result to that text file.
    But when I try to run the whole thing on LabVIEW, I can't manage to do so. LabVIEW only supports using the "Run Command" of Windows, not the cmd. (using the SystemExec vi)
    So how can I run "myprogram.txt > to_text.txt" on LabVIEW as I run it in cmd? Moreover, how can I send the break event (by pressing Ctrl+C in the cmd) by LabVIEW to stop the program?
    With my appreciations!

    I made this a while ago and haven't tested it too much but it should do what you want.  Provide the application path, then the switches in the array.  It does work with built in commands like dir and copy.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.
    Attachments:
    Execute Command Line With Switches.vi ‏24 KB

  • How to add CR and LF on a command in Labview?

    Hi,
    I am using the Walker MG-10D Gassmeter, and this instrument requires that all commands must be terminated with CR and LF. How can I do that? Could you please give me an sample example for " *IDN? " command? I am using Labview 6.0.
    Thanks a lot.

    You just need to form a string that contains these special characters. There are several possibilities, two are shown on the attached image.
    (1) right-click on the string constant and select '\' Codes Display. Now you can add \r for carriage return and \n for linefeed.
    (2) Just use "concatenate strings" with the special diagram constants found in the strings palette.
    Now send the final string to your device.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    AddCRLF.gif ‏2 KB

  • Convert Agilent 34972A command to labview program

    Hi,
    I'm using labview to remote control Agilent 34972A. 
    i need to read from one channel at a higher frequency,and write the result in a file. I think the following command would do that, but I couldn't make it work in labview program.
    CONF:RES  70000,1(@101)
    ROUTCAN(@101)
    TRIG:COUN 1000
    INIT
    FETC
    I attached the program that I'm using right now to get data from different channels with lower frequency.
    Thanks.
    Attachments:
    VI.jpg ‏190 KB

    It was suggested at http://forums.ni.com/t5/Signal-Conditioning/readin​g-from-one-channel-without-mechanical-opening-and-​... that you use the monitor function but I guess you didn't read that or bother to try.

  • LCD, extented commands and Labview

    Hello,
    I am using a serial LCD (https://www.sparkfun.com/products/9395) associated with a TTL-USB converter (http://www.miniinthebox.com/fr/cp2102-usb-2-0-vers​-uart-ttl-convertisseur-6pin-serie-du-module_p3910​... and labview with VI n°1. Sending simple commands such as the one in VI n°1 works fine. My problem is that I don't know how to send the Extended commands on page 2 here https://www.sparkfun.com/datasheets/LCD/SerLCD_V2_​5.PDF.
    For instance as far as I understand  the data sheet I need to send 124 128 in order to turn off the brightness of the screen. If I type "124 128" in VI n°1 the LCD screen displays "124128".  I get the same result with VI n°2.
    Would anybody know what I could try next?
    Thansk a lot.
    User1979
    Solved!
    Go to Solution.
    Attachments:
    VI n°1.png ‏8 KB
    VI n°2.png ‏9 KB

    It looks like those values (124 and 128) are the decimal equivalent of the bytes to be transmitted 0x7C and 0x80. It is not possible to tell for sure from your images but most likely you are sending the ASCII text characters for "1" "2" "4" and "1" "2" "8". Since they show up on the display that is almost certainly what is happening.
    In your second VI pop upon the string constants and select Hex Display from the pop up menu. Then type in the hex values 7C and 80.
    Lynn

  • Calling a DOS command with LabVIEW

    Is it possible to run commands that you might execute on the DOS prompt from
    labview?
    -- Stephen

    Well at least you did a search- the thread you replied to is 7yrs old! please start a new thread
    Jeff

Maybe you are looking for

  • Pls help me get itunes back on my computer.  runtime error R6034 and error 7 windows error 1114

    when i updated my itunes i got an error that it couldnt install it and to do it manually which didnt work either so i tried the uninstall and reinstall but i keep getting a runtime error R6034 and error 7 windows error 1114 and it wasnt installed cor

  • Elements 13 Organizer crashes each time I try to open it, any suggestions?

    I have just bought and downloaded Elements 13.  Running it on a MacBook pro OSX10.9.5.  Can open edit with no probe but every time I try to open Organizer it tries to open then crashes.  Have submitted multiple crash reports, and tried reinstalling i

  • Need help with buttons and fading clips

    howdy, I have 3 buttons on a stage that play 3 different movies. While no button is pressed, there is a looping video on the stage playing. When a button is pressed, that looping movie needs to fade out and fade in the movie that button calls for. I

  • Badi in ecc6.0

    screen in se18 and se19 in ECC6.0 is different from ECC5.0    so please guide me step by step to build badi in ecc6.0         rahul siemens

  • Fill internal table with mutliple entries for nested structure

    Dear ABAP Experts, I have a question related to fill internal tables with nested structures. I have a structure like this: BEGIN OF proto,           sicht TYPE ysicht,           version TYPE FAGLFLEXA-RVERS,           BEGIN OF kons, kon TYPE YKONSEIN