How to use the same button to control run or stop of the program?

I want to run a program when I press Boolen2, I use switch when press. So when I press it, it will turn "on" stature. There is a loop in the program. I want to stop it, when press the button again, that is when make the button from "on" statue to "off" stature.
But I don't know why it doesn't work in my vi. And is there other good way?
Thank you.
Attachments:
question2.vi ‏124 KB

Hi,
Thank you very much.Please download this file and save it under the same path,and change its extern name to dll.
I have tried follow your vi. But this method doesn't work properly in my vi. I don't know why.
Maybe it is because there is a highspeed data acquisition working in the loop. And I have tried to wait 100ms every loop.But it doesn't work.
Thank you for your help.
Hugo Liang. 
Attachments:
MP421.txt ‏237 KB

Similar Messages

  • I'm having issues with Time Machine since my upgrade to Mavericks, running at a snails pace.  Is anyone else experiencing the same?  WiFi is running fine, disabled all the Anti-Virus, still barely runs.

    Is anyone else experiencing the same?  WiFi is running fine, disabled all the Anti-Virus, still barely runs.
    2013 27" iMac

    I'm having the same issue, mine says prepairing to backup. I let it run for 12 hours and it never performed a backup. I have a Mac Book Pro

  • How to use one boolean button to control many boolean buttons?

    I would like to create a LabView control interface with boolean buttons.
    As my attachment picture shown, there are four boolean buttons.
    The button1 is the main power, if I press ON button1, other three
    buttons also turned to ON at the same time.
    How do I build up the LabView program in the block diagram?
    What should I do???
    Attachments:
    booleans.bmp ‏722 KB

    Controls and indicators function as variables. In a text based language, you could just write the name of the variable again. In LV, since each control only has one terminal, you need local variables to do this. To create a local variable, right click on the control and from the popup menu select Create>>Local Variable. You can have a local as read or write. Create a local for each of the buttons and wire the data coming out of the first button into the locals.
    There is something that is very important to understand here - when you use locals, you can disrupt the dataflow nature of LV and create race conditions. For example - if, after fixing your code, you were to click on one of the buttons, to set it to F, it would immediately be set back to T by the running code. This can be very dangerous. Also, I see you're using the continuous run mode. You should use a loop instead. Try looking for some LV by searching google for "Labview tutorials. Also, here's one you can start with.
    Try to take over the world!

  • How to use Java Robot to click the same button multiple times

    Hi All,
    I am trying to use Java Robot to turn a Windows utility located on the Desktop by clicking the same button on and then off with the following code:
      1.  Robot robot1 = new Robot();
      2.  robot1.mouseMove(400,180);
        // Turn on the utility
      3.  robot1.delay(100);
      4.  robot1.mousePress(InputEvent.BUTTON1_MASK);
      5.  robot1.delay(100);
      6.  robot1.mouseRelease(InputEvent.BUTTON1_MASK);
        //Wait for 2 minutes
      7.  robot1.delay(200);
        // Move the mouse to disconnect button
      8.  robot1.mouseMove(400,180);
        // Turn off the utility
      9.  robot1.mousePress(InputEvent.BUTTON1_MASK);
    10. robot.delay(100);
    11. robot.mouseRelease(InputEvent.BUTTON1_MASK);However, only the first click (line 1 - 7) worked. Everything from step 8 onwards doesn't appear to be doing anything. Even instantiating another robot2 to carry out step 8 - 11 did not work either. Also have tried running steps 9 - 11 only. ie skip 8.
    My aim is to turn this tool on and off at regular interval.
    Any assistance would be greatly appreciated.
    Thanks in advance,
    Jack

    Hi darth_code_r and Vincent,
    Both you and Vincent are right about insufficient time between the release ( 6 ) of mouse button and step ( 9 ) press the same button again to turn it off. You are also correct in saying that it was not necessary to move the mouse again ( 8 ) since it was sitting on the right button already.
    Below is the code I have ended up with which worked for me:
    1.  Robot robot1 = new Robot();
    2.  robot1.mouseMove(390,150);
    4.  robot1.mousePress(InputEvent.BUTTON1_MASK);
    6.  robot1.mouseRelease(InputEvent.BUTTON1_MASK);
         //Wait for 3 minutes
    7.  robot1.delay(30000);
    9.  robot1.mousePress(InputEvent.BUTTON1_MASK);
    11. robot1.mouseRelease(InputEvent.BUTTON1_MASK);This utility also takes a few seconds to turn itself on and vice versa. As a result, it is necessary to give it sufficient time to turn on prior to turning it off again with the second mouse press.
    Thanks to both of you very much,
    Jack

  • Can I use the "same" button multiple times for multiple galleries?

    OK so I am extremely untrained in CS4 and Actionscript. However I have managed to get along fairly well until I started to dynamically upload images as a gallery. This works great if I have one gallery, but for my site I have 9 galleries!!! I have a back and next button, but I want to be able to use those same buttons for all of the galleries so they look the same. I have split them up and renamed them, but I am clueless on how to script the buttons to work. Please help...and don't laugh at my poor scripting. This is what I have now because I do not know where to put the other button names without getting errors.
    stop();
    next_btn .addEventListener(MouseEvent.CLICK, nextImage);
    var imageNumber: Number=1;
    function checkNumber(): void{
        next_btn.visible=true;
        back_btn.visible=true;
        if(imageNumber==15){
            trace(imageNumber);
        next_btn.visible=false;
        if(imageNumber==1){
            trace(imageNumber);
        back_btn.visible=false;
    function nextImage(evtObj:MouseEvent):void {
        imageNumber++;
        mc_engagement.source= "photo/engagement/en0"+imageNumber+".jpg";
        mc_amish.source= "photo/amish/Amish"+imageNumber+".jpg";
        mc_chicago.source= "photo/chicago/ch"+imageNumber+".jpg";
        mc_landscapes.source= "photo/landscapes/land"+imageNumber+".jpg";
        mc_goodvsevil.source= "photo/goodvsevil/ge"+imageNumber+".png";
        mc_animals.source= "design/animals/an"+imageNumber+".png";
        mc_icons.source= "design/icons/icon0"+imageNumber+".png";
        mc_objects.source= "design/objects/pc"+imageNumber+".png";
        mc_typography.source= "design/typography/type"+imageNumber+".png";
        checkNumber();
    back_btn .addEventListener(MouseEvent.CLICK, backImage);
    function backImage(evtObj:MouseEvent):void {
        imageNumber--;
        mc_engagement.source= "photo/engagement/en0"+imageNumber+".jpg";
        mc_amish.source= "photo/amish/Amish"+imageNumber+".jpg";
        mc_chicago.source= "photo/chicago/ch"+imageNumber+".jpg";
        mc_landscapes.source= "photo/landscapes/land"+imageNumber+".jpg";
        mc_goodvsevil.source= "photo/goodvsevil/ge"+imageNumber+".png";
        mc_animals.source= "design/animals/an"+imageNumber+".png";
        mc_icons.source= "design/icons/icon0"+imageNumber+".png";
        mc_objects.source= "design/objects/pc"+imageNumber+".png";
        mc_typography.source= "design/typography/type"+imageNumber+".png";
        checkNumber();

    I'm still a novice with Flash myself, but I have two comments.
    First, at this point, won't your buttons control all galleries at the same time? Which means, if I go to image 5 in one gallery, then move to another gallery, I'll start at image 5, because the actions are all connected.
    Second, you can definitely use the same buttons for multiple galleries. It seems to me that as long as you've assigned the buttons an instance name, these actions should already work to control all the galleries (see the note above). I guess I would need to understand a bit more about how your project is built.

  • How to Use the same iview for both KM End User and the KM Administrator

    Hi friends,
    *This is my scenario :* How to Use the same iview for both KM End User and the KM Administrator but with different Context
    Menu Options.
    i followed these steps but im getting same context menu for both KM End User and the KM Administrator .
    Assign the role Content Administrator to the user km_admin. This is needed so that km_admin can change
    the presentation settings for the KM Folder u201EReports_kmFolder‟.
    Now, login with user km_admin. Navigate to the Km Folder reports_kmFolder through Content Administration
    -> Km Content. Click on Details link of the folder reports_kmFolder.
    Go To Settings -> Presentation. Click on the tab u201ESettings for You‟-> Click on button u201ESelect Profile‟.
    Select the radio button corresponding to u201Elayout Set‟, and choose u201EConsumerExplorer‟ from the dropdown.
    Click u201EOK‟.
    Select both the check boxes corresponding to Items Affected as shown above, and click u201ESave‟
    Now, remove the u201ESuper Administrator‟ role from the user km_admin and login with this user.
    How rto resolve this????
    Regards,
    Prasad.

    Hello Prasad,
    Most likely the user km_admin still has system principal roles assigned, even though you removed the Super Admin role, you should check that this user doesn't have any other admin roles, otherwise it will be considered a System Principal user and will therefore still have access to all content. For more information see http://help.sap.com/saphelp_nw70/helpdata/en/19/56f28fbd4e11d5993b00508b6b8b11/frameset.htm
    Try creating a new user with just read access to the content and you should see that it will not be able to make any changes etc.
    Regards,
    Lorcan.

  • Dear sir, i used this apple id in my IPAD 4,But some how i forgot the apple id password that was stored in my iPad. i reset the same in my another device. I put the new password in my I pad. Due to mismatching of

    Dear sir,
    i used this apple id in my IPAD 4,But some how i forgot the apple id password that was stored in my iPad. i reset the same in my another device. I put the new password in my I pad. Due to mismatching of password that was stored in iPad and new password ,it does not accept it. very unfortunately i also unable to connect my iPad with internet because it does not allow me to connect. In every second message displayed for apple id password. i am helpless. please help to get rid opt from this problem.
    rgds
    R K Hazarika
    <Email Edited by Host>

    you manage the appleID on this site
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/

  • HT1848 How do I transfer the songs from my desktop to my iPad using the same iTunes account? I can only sync the other way. Thanks

    How do I transfer the songs from my desktop to my iPad using the same iTunes account? I can only sync the other way. Thanks

    DaisyDoodle,
    The songs on your Shuffle should still be in your iTunes library.  That means you should just be able to connect your Nano to the same iTunes library and sync it just as you would with your Shuffle. There is no limit to the number of iPods, iPads, or iPhones you can sync to one computer, iTunes library, or account.
    As for preparing the Shuffle for your husband, just restore it via iTunes and then let him sync it to his own iTunes library or if its the same iTunes library, let him configure it to sync only his content.
    Here are instructions on how to restore the Shuffle if need be.
    http://support.apple.com/kb/ht1481
    B-rock

  • Hello all,  I bought an iPhone 5 in the US and brought it back to Brasil. Now I'm trying to use Siri, but once I press the "home" button "voice control" appears and it only works for me to call my contacts. The manual guide tells me to go to Settings Gene

    Hello all,
    I bought an iPhone 5 in the US and brought it back to Brasil. Now I'm trying to use Siri, but once I press the "home" button "voice control" appears and it only works for me to call my contacts. The manual guide tells me to go to Settings>General>Siri. At the General menu "Siri" doesn't appear. What should I do to set Siri up if it doesn't appear at settings>general?
    Thank you,
    Melanie.

    Go to Settings>General>Restrictions and make sure Siri is set to On.

  • How to keep the select arrow on the same button when returning to the menue after finished feature?

    Hello,
    just after my primary question is answered and I corrected my buttons there's another one which I cannot answer myself:
    I'm putting together a DVD with menues which contain a lot of options/buttons. People who watched the DVD wanted that the select/highlight arrow stays/returns to the button they selected prior. That's because there are so many buttons/options that some people might not remember which feature they just watched. So this means if people select the "Vacation 2008" button/feature the select/highlight arrow should be on the same button after the feature is finished and it returns to the menue.
    Since I haven't seen any functions/options for this: Is it possible to do or isn't it or does it happen just naturally?
    Hope this isn't too confusing :-)
    Help is appreciated!
    Thank you,
    Chris...

    ChrisHei wrote:
    Where would I select "Last Menu" for this to happen? In the properties for the button or for the timeline? And where exactly: "overwrite" or "remote menu" selection?
    Not in any override. Don't set any overrides unless you understand exactly how they work, or they will royally mess up your disc navigation.
    Normally, you select "Return to Last Menu" for an end action of the object (timeline, slideshow, playlist, etc.) that is playing. You can also set the Menu Remote property for the timeline/slideshow to "Return to Last Menu".

  • I want to do banners ,how can we do  when click the same button (next button)  it must show differen

    i want to do banners ,how can we do  when click the same button (next button)  it must show different images . cam any one help

    Check out my blog with samples on Edgehero.
    http://www.edgehero.com/articles/interactivity

  • How do I make FF4 look like FF3.6? I want the same buttons in the same places.

    I want the FF4 UI to look exactly like my FF3.6 UI. I want the same buttons in the same places.
    I have reverted to FF3.6 until this issue is solved. I do NOT like the new UI.

    You can make Firefox 4 look like Firefox 3.6, for details see http://www.computertechtips.net/64/make-firefox-4-look-like-ff-3-6

  • Lirc: Looking for a way to map the same button to two apps

    I have two apps on my PC that I would like to control: One is Mplayer, and one is Amarok. Now, I'd like a way to use (for example) the same buttons for volume, play/pause and skip/rew in both apps, but I have no idea how to do this, short of writing two lirc.confs, writing a script to swap them out and launching the script via irexec.
    Can anyone think of a simpler way to do this or do I need to do it the hard way?
    Ideally, I'd like it to be hierarchical: if mplayer is running, it gets the command. Otherwise, Amarok gets it (since it's always running anyways).

    I have two apps on my PC that I would like to control: One is Mplayer, and one is Amarok. Now, I'd like a way to use (for example) the same buttons for volume, play/pause and skip/rew in both apps, but I have no idea how to do this, short of writing two lirc.confs, writing a script to swap them out and launching the script via irexec.
    Can anyone think of a simpler way to do this or do I need to do it the hard way?
    Ideally, I'd like it to be hierarchical: if mplayer is running, it gets the command. Otherwise, Amarok gets it (since it's always running anyways).

  • How to use radioButton(s) and image controls on windows phone 8.1

    how to use radioButton(s) and image controls on windows phone 8.1

    Hi aspirantme,
    >>how to use radioButton(s) and image controls on windows phone 8.1
    Which version of your app is? Runtime or Silverlight?
    For Runtime version, please see the following articles:
    #RadioButton class
    https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.radiobutton(v=win.10).aspx
    #How to add radio buttons (XAML)
    https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868200.aspx
    #Image class
    https://msdn.microsoft.com/library/windows/apps/br242752.aspx
    For Silverlight version, please refer to the following documents and guidelines:
    #RadioButton Class
    https://msdn.microsoft.com/en-us/library/windows/apps/system.windows.controls.radiobutton(v=vs.105).aspx
    #RadioButton control design guidelines for Windows Phone
    https://msdn.microsoft.com/en-us/library/windows/apps/hh202881(v=vs.105).aspx
    #Image Class
    https://msdn.microsoft.com/en-us/library/windows/apps/system.windows.controls.image(v=vs.105).aspx
    #Quickstart: Images for Windows Phone
    https://msdn.microsoft.com/en-us/library/windows/apps/jj206957(v=vs.105).aspx
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Two actions in the same button

    Hi. I have a button witch tells a movie clip, that is loaded
    on an empty movie clip on stage (handler) with attachMovie, to play
    frame 101 (it leaves the stage). How can I tell the same button, at
    the same action (onRelease) to attach another movie clip only when
    the other one is over (after I told it to play from frame 101) or
    when it´s at frame something?
    Anyone can help?
    I´m using as2.0

    Hi,
    Create action binding for your button and try to call both the services from this method binding.
    Example :
    <af:commandButton action="#{pageFlowScope.myBean.submitButtonMethodBinding} .../>
    In the managed bean :
    public class MyBean{
    public String submitButtionMethodBinding(){
    ---- calll first service ---
    --- call second service ---
    return "dontgoanywhere";
    }

Maybe you are looking for

  • Windows 7 Home Premium - cannot log on to user's account (immediate logout).

    I cannot logon to my Windows 7 Home Premium user account. The system says "Welcome" for some short time and then immediately logs me out. I have found the following warning in system logs: The Windows logon process has failed to spawn a user applicat

  • Using a text link to open a new browser window to a specific size

    i can figure out how to make a link open up a new window (_parent, _top, etc.), but how do i make the window a specific size? thanks,

  • Best settings to export with least compression

    I am adding Denoiser to some clips in my project.  Best workflow is to add to raw footage, render out and bring back into project (to edit and render to final export).  I am working with AVCHD footage - 1920 x 1080 30 fps. What is the best setting to

  • Large table, primary key constraint

    I have migrated a table from 8i to 9i that is over 300 million rows. I migrated the the table to a 9i database without constraints or indexes. I have successfully created a composite index of two columns, t1 varchar2(512), t2 varchar2(32). This index

  • Iphone software update error 21.

    Further to others this has happened with mine 3GS and I have lost everything on the phone which does not work. Apple help desk sent me a email of their help which was no good. Even deleting and reloading iTunes was unhelpful. Any ideas?/