How to realize this operation?

Hi there,
I am trying to realize the following operation, when I choose  an option, the program will run continuesly, if I choose another option, the program will run for only one time, I have make a test code as attached, I use a case structure and copy the code inside the while loop of "true" case to the "false" case, it barely works, however, when the code inside the "while" loop is very complicated, i dont want to copy the codes to the "false case". So are there any one has a better way to change the code structure and realize this operation? in the test code,  I only want one graph indicator in the front panel.
Thanks,
Mike   
Attachments:
testvi.vi ‏15 KB

Well, you have full control on how many time the while loop runs, so of you want to loop only once, just make sure it stops after one iteration. There is no need to duplicate code if the only difference is how often it should loop.
Here's a rough draft: The loop will stop if either run once is selected (before runing) or the stop button is pressed during running).
Message Edited by altenbach on 08-13-2007 05:17 PM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
OnlyOnce.png ‏6 KB

Similar Messages

  • How to realize this kind of ALV(with two headerlines)?

    Dear all:
      could anyony provide some advice on how to realize this kind of ALV?
    |--|--
    field2
    |--|||--
         field11  |  field12   |  field21  |  field212      |
    |--|||--
    wait your kindly advice

    I had similar kind of requirement. Have a look at below code. It will help you. You can execute it. You can see the report output which contains two header lines.
    REPORT  ztestvib    MESSAGE-ID zz  LINE-SIZE 50.
    TYPE-POOLS: slis.
    DATA: x_fieldcat TYPE slis_fieldcat_alv,
          it_fieldcat TYPE slis_t_fieldcat_alv,
          l_layout TYPE slis_layout_alv,
          x_events TYPE slis_alv_event,
          it_events TYPE slis_t_event.
    DATA: BEGIN OF itab OCCURS 0,
          vbeln LIKE vbak-vbeln,
          posnr LIKE vbap-posnr,
          male TYPE i,
          female TYPE i,
         END OF itab.
    SELECT vbeln
           posnr
           FROM vbap
           UP TO 20 ROWS
           INTO TABLE itab.
    x_fieldcat-fieldname = 'VBELN'.
    x_fieldcat-seltext_l = 'VBELN'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-col_pos = 1.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    x_fieldcat-fieldname = 'POSNR'.
    x_fieldcat-seltext_l = 'POSNR'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-col_pos = 2.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    x_fieldcat-fieldname = 'MALE'.
    x_fieldcat-seltext_l = 'MALE'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-col_pos = 3.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    x_fieldcat-fieldname = 'FEMALE'.
    x_fieldcat-seltext_l = 'FEMALE'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-col_pos = 3.
    APPEND x_fieldcat TO it_fieldcat.
    CLEAR x_fieldcat.
    x_events-name = slis_ev_top_of_page.
    x_events-form = 'TOP_OF_PAGE'.
    APPEND x_events  TO it_events.
    CLEAR x_events .
    l_layout-no_colhead = 'X'.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
        i_callback_program = sy-repid
        is_layout          = l_layout
        it_fieldcat        = it_fieldcat
        it_events          = it_events
      TABLES
        t_outtab           = itab
      EXCEPTIONS
        program_error      = 1
        OTHERS             = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *&      Form  top_of_page
          text
    FORM top_of_page.
    *-To display the headers for main list
      FORMAT COLOR COL_HEADING.
      WRITE: / sy-uline(103).
      WRITE: /   sy-vline,
            (8) ' ' ,
                 sy-vline,
            (8)  ' ' ,
                 sy-vline,
            (19) '***'(015) CENTERED,
                 sy-vline.
      WRITE: /   sy-vline,
            (8) 'VBELN'(013) ,
                 sy-vline,
            (8) 'POSNR'(014) ,
                 sy-vline,
            (8) 'MALE'(016) ,
                 sy-vline,
             (8)  'FMALE'(017) ,
                 sy-vline.
      FORMAT COLOR OFF.
    ENDFORM.                    "top_of_page
    The header lines are as below:
    VBELN      POSNR      MALE       FMALE
    I hope it helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • How to realize this reqirement in the dashboard prompt in OBIEE 10G?

    Hi,
    I have a new query about dashboard prompt in OBIEE 10g..
    All below is needed to Operator in the dashboard prompt.
    We have 4 columns, 4 columns using multi-select type need to constrain together and need to show value which is related with product..
    e.g.
    Now I display "REGION" column using multi-select in Control, and I need to show data which product name is not null. After I add "where product name is not null" in the SQL results in Show, then I cannot use the Constrain box.. and I cannot set any variable if I using multi-select type..
    So anybody have any idea about this?
    Your reply will be highly appreciate..
    Regards,
    Anne

    Hi Anne
    User Input type as " Multi select prompt" keep it with constrain option then apply below query
    apply like this kind of SQL query in Default selection --->SQL result section
    SELECT "MX_PORTFOLIO_STATIC"."MT_BU_Level1" FROM "Position" where "MX_PORTFOLIO_STATIC"."MT_BU_Level1" is not null
    Thanks
    Deva

  • How to realize WHEN-RADIO-CHANGED- Trigger in ADF

    Hy@ all,
    I try to redevelop the Summit Forms Demo in ADF.
    One of the existing modules is called "ORDER" and contains, among other things, radio buttons based on a database column(VARCHAR2) named PAYMENT_TYPE which contains the values CASH and CREDIT.
    Based on this Item a WHEN-RADIO-CHANGED- Trigger is called which shows an alert and reset the changes to a default value when the payment type is changed but the credit rating(database column from another table) is not equal to an according value.
    The code of the trigger is the following one:
    DECLARE
         n NUMBER;
         v_credit S_CUSTOMER.CREDIT_RATING%TYPE;
    BEGIN
         IF :S_ORD.payment_type = 'CREDIT' THEN
              SELECT credit_rating
              INTO v_credit
              FROM S_CUSTOMER
              WHERE :S_ORD.CUSTOMER_ID = ID;
         IF v_credit NOT IN ('GOOD', 'EXCELLENT') THEN
              :S_ORD.payment_type := 'CASH';
              n := SHOW_ALERT('PAYMENT_TYPE_ALERT');
         END IF;
         END IF;
    END;
    Now my questions are where to place the equivalent code(EO, VO, etc.?) and how to realize this.
    Further, is it possible to roll out the trigger code to the database and then call this stored unit from "the right place"?
    I´m using JDeveloper v10.1.3.1.0 and I´m pleased about any reply or solution.
    Best regards
    Chris

    The answer will depend on how you are storing the parameter in your ADF application and when do you actually need it to be set and based on what.
    This can be for example a property of a managed bean in your JSF application and you can initialize it either in the bean itself or in the faces-config.xml file as a managed property.
    http://www.oracle.com/technology/tech/java/newsletter/articles/jsf_pojo/index.html

  • How to realize customer menu?

    I'm building an application with customer menu.
    I want to open a few subvis running indenpently with menu in main vi.Someone can tell me how to realize this and had better give some simple examples?
    I am a beginer,I need your help and your help is appreciated!

    Hi
    Look at this: http://zone.ni.com/devzone/devzone.nsf/webcategories/8DA27C34C5069CB486256793006F5079?opendocument&node=DZ52060_US
    Especially the link "Menus and Toolbars" can help you.
    Regards,
    Luca

  • How do I solve the issue of this message "you do not have enough access privileges for this operation" on my iTunes?

    How do I solve the issue of this message "you do not have enough access privileges for this operation" on my iTunes? I already went to the folder of iTunes inside the Finder and change all permissions to allow read and write... no improvement at all. Any help? thanks!

    Hi! I just realized I have two folders called library, one is inside HD alongside with System and users, then I have also "library" inside users, some of the folders are apparently repeated, some are missing. And all the music is inside a folder called iTunes Music, inside Music, inside users. Now that I relaized some folders are repeated I applied to all related to iTumes r/w permission. But the annoying message keeps coming on.
    And yes, I am using Leopard, 10.5.8.
    Any ideas?

  • When i login to MES operator resp..i get a error saying...You must setup an HR employee for this Oracle Application user...how to resolve this?

    when i login to MES operator resp..i get a error saying...You must setup an HR employee for this Oracle Application user...how to resolve this?

    Hey everyone in Apple world!
    I figured out how to fix the flashing yellow screen problem that I've been having on my MBP!  Yessssss!!!
    I found this super handy website with the golden answer: http://support.apple.com/kb/HT1379
    I followed the instructions on this page and here's what I did:
    Resetting NVRAM / PRAM
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.
    I went through the 6 steps above twice, just to make sure I got rid of whatever stuff was holding up my bootup process.  Since I did that, my MBP boots up just like normal.  No flashing yellow screen anymore!!   
    (Note that I arrived at this solution when I first saw this page: http://support.apple.com/kb/TS2570?viewlocale=en_US)
    Let me know if this works for you!
    Elaine

  • I keep getting dialog box saying " The itunes Library file cannot be saved. You do not have enough access privileges for this operation"  I am the only user on this computer and only one library! how do i change access privileges please?

    hi I keep getting the dialog box " The iTunes Library file cannot be saved. You do not have enough access privileges for this operation"
    How do i  amend this  as i only have one account and one library. I cannot save new work or delete duplicate files

    A belated reply, as the problems itunes has have discouraged me from using it much. If you uncheck the "read only" box, it doesn't stay that way! Next time you use it, the box comes up checked.
    I'm still having that problem, even when I open iTunes as administrator.
    I've yet to see the answer to this problem. I use itunes mostly to download audiobooks, and I'm ready to download more, and want to save them!

  • When I try to sync my ipad using itunes I get the following message. This iPad cannot be synced. You do not have enough access privileges for this operation. Any ideas how this can be resolved?

    When I try to sync my ipad using itunes I get the following message. This iPad cannot be synced. You do not have enough access privileges for this operation. Any ideas how this can be resolved?

    See if the user tip helps: https://discussions.apple.com/docs/DOC-6562

  • Have MacBook Pro (ancient) has 2.16 Ghz Intel Core Duo with 1 GB 667 MHz RAM using OS 10.4.11. Can I upgrade OS? If so, how far? And can I add more memory? I realize this is an old laptop but I need to wait to upgrade to new.

    Have MacBook Pro (ancient) has
    2.16 Ghz Intel Core Duo with
    1 GB 667 MHz RAM
    using OS 10.4.11.
    Can I upgrade OS? If so, how far?
    And can I add more memory?
    I realize this is an old laptop but I need to wait to upgrade to new.

    if it is the core duo, mac OS X 10.6.8., max ram 2gb.

  • How can I fix an error message saying, "This operation has been cancelled due to restrictions in effect on this computer " when I try to open a webpage from a hyperlink in Outlook?

    When I click on a hyperlink in an email (Outlook), I get the error message "This operation has been cancelled due to restrictions in effect on this computer " and it won't open the hyperlink. None of my Outlook settings are blocking the hyperlink. How can I fix it?

    When I click on a hyperlink in an email (Outlook), I get the error message "This operation has been cancelled due to restrictions in effect on this computer " and it won't open the hyperlink. None of my Outlook settings are blocking the hyperlink. How can I fix it?

  • Get error message when syching iPod, iPod cannot be synced. You do not have enough access priveleges for this operation.  How to solve this?

    Get error message when syching iPod, iPod cannot be synced. You do not have enough access priveleges for this operation.  How to solve this?

    Hello FranBNYC
    It sounds like a permissions issue with your library, check out the article below to check and make sure that things are set correctly.
    Trouble adding music to iTunes library or importing audio CD
    http://support.apple.com/kb/ts1387
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • ITunes error: The iPhone "iPhone" cannot be synced. You do not have enough access privileges for this operation. is preventing my iPhone from syncing. How do I fix it?

    The iPhone "iPhone" cannot be synced. You do not have enough access privileges for this operation. is preventing my iPhone from syncing. How do I fix it? I have changed permissions until blue in the face. What is going on? Why is this so hard? I just want to sync my phone.
    A little background. My iTunes library is in a shared folder. My Aperture library is on a .DMG in the shared folder with "ignore permissions on this volume" checked. I have added myself with read and write privileges to everything that I can find. What gives? Thanks in advance.

    PC, windows7, iphone4, updated iphone (5.0.1) and itunes (10.5.2.11) software. Started getting "iphone cannot be synced. You do not have enough access privileges for this operation" message.
    Solution I found that worked: Uncheck "Sync photos from Iphone" in Itunes / Devices / Photos tab.

  • New PC with Windows 8.1 trying to sync phone but receive following error message and don't know how to fix: iPhone cannot be synced. You do not have enough access privileges for this operation.

    In downloading iTunes onto my PC (Dell XPS 8700) with Windows 8.1 trying to sync my iPhone but receive keep receiving following error message and I just don't know how to fix: iPhone cannot be synced. You do not have enough access privileges for this operation.
    I would greatly appreciate help with this matter.

    See if the user tip helps: https://discussions.apple.com/docs/DOC-6562

  • Hi everyone.. I have windows 7 (32 bit operating system), and have tried installing the latest version of Itunes, but my PC keeps saying windows 7 error (126) ? I have no idea on how to fix this??

    hi everyone.. I have windows 7 (32 bit operating system), and have tried installing the latest version of Itunes, but my PC keeps saying windows 7 error (126) ? I have no idea on how to fix this??
    Please could someone help???
    And it also mentions mediatoolbox dll. is missing?? haha i have no idea what that means??? please help...
    Thanks alot! I really appreciate your help..

    Try the following user tip:
    Troubleshooting issues with iTunes for Windows updates

Maybe you are looking for

  • Resetting a Case structure

    I am writing a VI that reads in a signal to a comparator and sends the output to a case structure. The ides behind the project is EMG (monitoring muscle active/inactive times). The case structure is as follows: If 1: count up and if count reaches 10

  • Solve this and you're a genious: Port problems with SRW2016

    Equipment: One SRW2016 fresh out of the box and set to factory default settings One Dell Laptop running Windows XP One custom network appliance running a full TCP/IP stack but limited to 10M half duplex. Setup: The laptop has a static IP address. The

  • Download DDIC Table to Excel

    Hi all, is there any standard report which downloads a ddic table to server as a .xls or .txt file? It should run in background. I know how to write a report which does that, but i'm wondering if there is already a standard report which does that. Re

  • GETWA_NOT_ASSIGNED error while running abap prog

    Hi. I am getting a runtime error GETWA_NOT_ASSIGNED while running an ABAP program in process chain. But when i execute pro in SE38 , it's not giving any error. Please any one can suggets what will be error.

  • Itunes on my iPhone has my old email address

    I am unable to import my iTunes Library because my iPhone keeps using my old email address & not longer no that password.  So how do I change iTune on my Iphone to my new email address etc..????