Stop button to reinitiali​ze c-RIO module values

As you can see, the program has 2 stop buttons.  The one inside the tab is to stop charging of an electric vehicle prototype whereas the one outside is for stopping the while loop and labview program. Both stop buttons are wired to the same conditions except the additional function of the 2nd stop button for passing notification i.e.:
The labview program is connected to the EV hardware through c-RIO system via ethernet, which uses NI 9411 for updating the charging status of the EV prototype. The issue is: while the 1st stop button causes the counter value of NI 9411 to fall thus updating the charging status of EV, the 2nd one just stops the program and goes back to the first page and the status remains the same (even though this can be modified for display in the labview program, it cannot be changed in the hardware). What do i need to do to update EV status before stop button makes the program exit and goes back to the start page of the program?

Hi!
I read your question (and GerdW's answers) to be a request for a piece of code to fix your problems. I think what you really need is to take the time to have a look at some design patterns for code, and figure out how it can be used to solve your particular problems. Use the LabVIEW Example Finder (Help -> Example FInder) to look for examples that come with LabVIEW! My suggestions:
Event Structures: This is a structure specifically designed to catch user driven events, such as clicking a button, and executing a certain piece of code in accordance with the input. Example: Clicking the "stop button" might start some code that gracefully shuts down your program. 
State Machines: A state machine is a structure usually built using a while loop and a case structure containing pieces of code that perform specific tasks (e.g. "initialize", "check conditions", "idle", "charge" and so on). Each state/case determines in some way what should be the next state to execute. Passing states to the next iteration can be done with queues or shift registers.
Good Luck!
Best regards,
Jarle Ekanger, MSc, CLD
Flow Design Bureau AS

Similar Messages

  • The back, forward, reload and stop buttons are greyed out, the address bar stays blank when I go to a website and firefox loads to a blank page, not my home page. There are 3 users on this computer and it only happens on one user.

    Firefox loads to a blank page, not my home page. When I click on the home button it takes me to the home page. The back, forward, refresh and stop buttons are greyed out and not usable. The webpage I am on does not show up in the address bar. If I type something into the address bar, that address stays there no matter what page I go to next.

    Just upgraded to v4. It did NOT fix the problem.

  • How to terminate or exit a for loop when the user clicks on stop button

    Actually my problem is to stop a loop when i click on stop button.
    example:i have two buttons 'start' and 'stop'
    in start buttom i wrote a for loop as
    dim i as integer
    For i=1 To 100000
    print i
    Next
    when i click on start buuton it prints 'i' value up tp 100000.
    my question is when i click on 'Stop' button the for loop has to terminate or Exit from the  loop and should stops the execution.
    Is it possible to termianate or Exit the 'for loop'
    PS.Shakeer Hussain
    Hyderabad

    I am unable to stop the loop and application not at all allowing to Press the Stop button.
    It seems like Hung, any advise ?
    Private Sub btnStart_Click(sender As Object, e As EventArgs) Handles btnStart.Click
            btnStop.Enabled = True
            btnSelectFile.Enabled = False
            btnStart.Enabled = False
            btnStop.Focus()
            Dim strFileName As String = txtFileName.Text.ToString
            Dim strLineText As String
            If System.IO.File.Exists(strFileName) = True Then
                Dim objReader As New System.IO.StreamReader(strFileName)
                While objReader.Peek() <> -1 And stopclick = False
                    strLineText = objReader.ReadLine()
                    MsgBox(strLineText, MsgBoxStyle.Information)
                    Application.DoEvents()
                    Thread.Sleep(My.Settings("strDelay") * 1000)
                    'System.Diagnostics.Process.Start(My.Settings("strFireFoxLocation"), strLineText)
                End While
            End If
        End Sub
        Private Sub btnStop_Click(sender As Object, e As EventArgs) Handles btnStop.Click
            stopclick = True
            btnSelectFile.Enabled = True
            btnStart.Enabled = True
            btnStop.Enabled = False
        End Sub
    Raman Katwal
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How do I create a start/stop button for each separate while loop within my program, when each of them does a different task?

    I have a multimeter VI with separate while loops to accomplish the different tasks of reading  voltage, current, etc. Each while loop has a stop button, but I need a button that will have to be pressed in order for the while loop to even start. I tried putting another while loop around the present one, but it still has to run once before it will stop. I want the user to have to press the button before it runs, because they interfere with each other.
    I am just learning so patience and your kind assistance is greatly appreciated!
    ElectroKate

    iZACHdx wrote:
    Hello,
    I'm not entirely clear with everything you have going on and what you want your final functionality to be, but you can use sequence structures to prevent a loop from starting until the user presses a button like this:
    -Zach
    I have to ask, why is an NI employee using examples using sequence frames? The same thing could be accomplished using data flow by simply wiring the value of the first stop button out of teh first while loop and connecting it to the second loop. This would then use data flow to control the sequence. Why show new users bad programming methods?
    As to the original question I would concur with altenbach on using an event structure.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • HT201272 What is it with songs that are not from the itunes store, but are coming from cd's and other download sources that all of a sudden do not play on my iphone and have a red stop button in a red round circle around them, behind the title?

    Songs that I have had previously downloaded from various other sources, but NOW ALL of a sudden they DO NOT PLAY on my IPHONE and DISPLAY a RED STOP BUTTON in a red round circle next to the title.  Everytime I click on it it DOESNT play.   What happen???? How can i get them to play.,   Why should i have to pay for the songs, and why are they in the ITUNES store and not in my regular playlist.

    Amazing steps you've done so far! The great news is this is very unlikely an issue with your iPhone.
    I've run into a similar issue lately as well. I narrowed it down to one song that was causing 30 songs not to sync. I removed the song from the sync list (unchecked it) and all 29 songs were able to sync.
    You may be running into a similar issue. This may be a problem with this version of iTunes, an issue with one song or a group of songs; hard to know for sure. It's important to narrow down and isolate the cause. Most imporantly get that music back on there!
    The way to narrow down the casue add just a few songs at a time (even 1, just to get that first sync finished). Manually syncing is what you'll need here.
    Plug in your iPhone, on the Summary screen (shows a picture of your iPhone, the iOS version, Restore iPhone....; etc). Under the Options area at the bottom choose to Manually Manage Videos and Music then choose Apply in the lower right. The music that's on your iPhone now should be removed from your iPhone now. You're now able to sync music manually.
    The link below explains how to drag the songs from the iTunes library on the computer on to your iPhone which will start the sync. Add just one song just to see if you can get 1 of those hundreds of songs on there. If you can, awesome! Keep adding until you find the song or group of songs that are causing this issue.
    http://support.apple.com/kb/HT1535
    Please let me know how things are going.
    Cheers!

  • How do i disable a stop button within an event

    Using LabView 8.6 I'd like to disable my vi's stop button so the user can't stop the vi unless the network application is in the correct mode of operation.
    I only want the user to be able to stop the vi when it is ok to do so. What I tried works to prevent the stop button from operating at the wrong time but the vi does not always stop and I have to force the vi to stop.
    My event structure handles all the buttons and inputs for my vi. The event structure is within the while loop that generates commands for the network application when I click on one of the buttons or enter a value into a input field. Another while loop is reading data from the network application and displaying the data on the vi. I used a "Stop" local value to stop the display while loop.
    How am I supposed to disable the stop button but have my vi stop when it is ok to do so in the correct way?
    Attachments:
    Image 1.jpg ‏61 KB

    OK I'll try to handle this point by point.
    Q1, what gets wired to the "SilentShutdown" & "Discard?" when using "Application Instance Close?" 
    A1 Wire a TRUE to Discard?  That's the only thing that event case needs if the Stop condition output is default if unwired "F"   
    REASON you had a problem" it makes not sense to wire the same value to both Discard? and Silent Shutdown?  (Or even use both)  Discard in Filter events is used to "Trap" the event and decide if the app really wants to process it so discarding an app close removes the event and the OS wont process it.  Silient Shutdown? does just about the opposite an tru hear means "Shut down the app without any normal user prompts" Wiring them both T or F would trigger either allowing the app close event to process normally or triggering a application shutdown.
    COMMENT:  I've tried various combinations of nothing & true/false but clicking on the "Windows Red X" still closes the window (as far as I know no one has ever clicked the windows close, but the "Stop" button has been clicked a number of times by mistake)
    RESPONSE: Ah! You have "Trained" LabVIEW users!  They have been burned so often by LabVIEW code that they expect it to misbehave and don't even think about trying to "Close" a LabVIEW window.  In decades past the event structure did not exist in LabVIEW and so the only way to prevent the app close event from firing was "User Training."  There are better practices available now.
    Q2: If I get the previous suggestion to work and follow the next suggestion (Rip off the abort button), I won't be able to ever stop the vi when it hangs. It still does that sometimes. In my actual vi I'm still getting the hangs.
    Amplifications:
    if the vi stops[,] the network communication & control to the network application is lost.
    then the only way to stop this applications[external app on another processor] is with "^C" in the Putty window.
    A2: You've got the tail wagging the cart before the dog-horse!  BOTH application need to be rethought in such a manner as they can be independantly controlled.  But, this is a LabVIEW forum so I expect that your scope of work is to get the LabVIEW side working in a dignified manner- let's concentrate on that.  PuTTY windows and Task Managers are not evil - for debugging and integration.  especially when integrating multiple processes that may not yet be "Mature".  but a quick VISA write "^C" in your shutdown code might make the other application tolerable
    Q3hould I use a "Flat" or "Stacked" sequence to control the order of execution within the "data" loop?
    A3: NEITHER.  You should do a quick forum search for Queued State Machine or Queued Message Handler (QSM and QMH) after looking at the help for the QSM Sample Project (LabVIEW 2012 or later) the Shipping examples are a good place to start but! many discussion threads have questioned the example's exit practice and offered some alternate examples.
    Jeff

  • How can I move the tab bar to the bottom, and how do I get my reload and stop buttons back?

    The new version of Firefox has repositioned my tab bar to the top and I cannot move it to the bottom. I tried about:config, but browser.tabs.ontop was already set to false - very curious, since this should have solved my problem in the first place.
    In the new version of Firefox I cannot get my reload and stop buttons back again.

    Firefox uses a combined Stop/Reload/Go button that is positioned at the right end of the location bar.
    *You get a Stop button during page loading that changes to a Reload button when the page has finished loading
    *You get a Go button if you modify the location bar content
    *Middle-click the Reload button to duplicate the current tab to a new tab

  • How do I get all the control buttons in one place in 3.6.16, like they used to be in previous versions? Having the refresh and stop buttons between address and search windows, and the home button to the far right is awful.

    In 3.6.16, the buttons are all over the place. In previous versions, the forward, back, refresh, stop and home buttons were all together. In this version, the refresh and stop buttons are between the address and search windows, and the home button to the far right.
    I would love to have them all together as they used to be - much more user friendly that way. I have tried installing alternate themes, but the coding of this version over-rides the themes.

    Firefox 4.0 has a combined Reload and Stop and Go button that appears at the right end of the location bar.
    To restore the Firefox 3 appearance you can use these steps:
    * Open the "View > Toolbars > Customize" window to move the Stop and Reload button out of the location bar.
    * Move the Reload and Stop buttons to their previous position at the left side of the location bar.
    * Set the order to "Reload - Stop" to get a combined "Reload/Stop" button.
    * Set the order to "Stop - Reload" or separate them otherwise to get two distinct buttons.

  • Aperture 3 shuts down every time I try to use it after only using it for one minute. Aperture closes then a pop up screen asks if I want to reopen Aperture. If somrone at Aperture didn't keep pushing a stop button for it to close,it wouldn't need to ask t

    Aperture 3 shuts down every time I try to use it after only using it for one minute. Aperture closes then a pop up screen asks if I want to reopen Aperture. If somrone at Aperture didn't keep pushing a stop button for it to close,Apple wouldn't need to ask the stupid question"Do you want to reopen Aperture?" to begin with. Anyone out there having the same annoying problem?? I like Aperture or used to anyway,but if this nonsense continues, I will be forced to buy some other editor besides "No hanging fruit - Adobe photoshop CS5" or "I don't like you so I'm shutting down - Aperture".

    Hello,
    sorry to hear about your troubles, but we will need to have more technical information about your problem to be able to help you:
    There may be several reasons that can cause Aperture to crash on start up:
    You may have imported an image (or video) in an encoding that Aperture does not support, or that is larger than 2 GB, or that is corrupted and Aperture cannot process it
    Your Aperture Library or Preferences may have been corrupted
    Or you are having a system wide problem with your machine.
    Or you may simple be running out of disk space.
    It would help, if you could post the crash log from your last crash. Also, more details on your Aperture Library: Is it managed or references? how large is it? Is it on your system drive or on an external drive?
    What have you done, shortly before the trouble started? Have you imported new images or videos? Did you install any plug-ins or any new software, lile Final Cut?
    Try, if you can get Aperture to launch, if you defer the generation of Previews: Hold down the SHIFT-key immediately after you start Aperture to prevent preview generation for that session. If a damaged image in your library is preventing normal opening, this may allow you to start Aperture. If this succeeds, try to identify the broken image or video among the images you recently imported and remove it from the library.
    Regards
    Léonie
    Don't you think your user name is a little bit tactless in an Apple provided forum?

  • When i plug my ipod in it says ipod cant be read cuz the apple mobile device is not started.And i went to services and apple mobile device properties and start stops in the middle.and its on automatic.and there isnt a stop button.

    when i plug my ipod in it says ipod cant be read cuz the apple mobile device is not started.And i went to services and apple mobile device properties and start stops in the middle.and its on automatic.and there isnt a stop button.when i click start it says the apple mobile device services stopped in the middle then stopped.it said some services stop in the middle if not used by other services.and i just updated itunes before all a this and ever since ive had errors.

    Have you looked at this article:
    iPhone, iPad, iPod touch: How to restart the Apple Mobile Device Service (AMDS) on Windows

  • Hitting Stop Button in the middle of a JSP Request

              From a browser while servlet is doing some work for a users request, the user hits the stop buttom. In the process the
              servlet forwards the results to a JSP to be displayed using the request dispatcher, The result is the appserver goes
              into what looks like a loop.
              Any ideas how to handle a request that has not been finished when a user hits the stop button?
              We are using WL 5.1, SP7.
              Thanks.
              

    The camera formats the memory card using the "FAT32" filesystem rather than a proprietary filesystem.  This allows the card to be read by nearly any computer (Windows, Mac, etc.)  
    HOWEVER... there's a limitation in that filesystem that no single file can grow above a specific size.  That size is 4GB.
    Also, the camera documentation describes that the camera will stop just 1 second short of the 30 minute mark regardless of the file size.  
    In pro video, movies are normally constructed by bringing together many very short clips.  The one-long-continuous-take video style isn't used.  If you are attempting to record a long event in one-long-continuous-take then it would be better to use a video camera for the task.
    Tim Campbell
    5D II, 5D III, 60Da

  • Where is firefox's STOP button gone Now?!!!

    firefox updated itself to version 29.0.1 This update removed some of my customized toolbar icons like ieview, and moved Home button to the far right, added some icons I removed from toolbar last time because they are useless to me, and my STOP button is gone! Where is the stop button? It's not under customize!!! I'm seriously considering Opera, or Chrome now. It's was bad enough when the "programmers" removed the ESC function so some websites now take forever to load Junk and I get ticked off after 10 seconds and have to click click Stop! But now Stop is missing too...
    Un-Friggin' believable!!! >:(

    It's inside URlbar , when you press F5, you will see it !
    Or Reset FF : Help > Trouble > Reset
    Or using Classic Theme Restorer : https://addons.mozilla.org/vi/firefox/addon/classicthemerestorer/

  • I want a stop button for disabling JavaScript only in the current tab

    I want a 'Stop' button for disabling JavaScript only in the current tab.
    I searched for a feature like this but couldn't find it. It would be a great new feature.

    Tab Permissions: https://addons.mozilla.org/firefox/addon/4757

  • The Stop button does not show except when I'm customizing settings

    I have just upgraded from FF 3.6 to FF 8. The Stop button (X) does not appear between the Reload and Home buttons.
    However, if I right click the menu bar and select Customize... , the X appears as it should, then disappears again when I close the Customize... box.
    Thanks for your assistance. This may be tied to the other error I'm receiving:
    [https://support.mozilla.com/en-US/questions/894055 TypeError opening FF 8]

    Thanks, SafeBrowser. Step 3 did the trick!

  • HT1386 I've encountered a problem while synching my entire library. After synching I've noticed that only half of my library is playable on my iPhone. And a red circle with a Stop button appears next to the songs that didn't sync. Why is this happening?

    I've encountered a problem while synching my entire library. After synching I've noticed that only half of my library is playable on my iPhone. And a red circle with a Stop button appears next to the songs that didn't sync. Why is this happening?

    media in the itunes lib but not connected when the sync take part will fail in this manner
    media in a not supported format on ios will fail to sync
    http://www.apple.com/iphone-5s/specs/
    Audio formats supported: AAC (8 to 320 Kbps), Protected AAC (from iTunes Store), HE-AAC, MP3 (8 to 320 Kbps), MP3 VBR, Audible (formats 2, 3, 4, Audible Enhanced Audio, AAX, and AAX+), Apple Lossless, AIFF, and WAV
    User-configurable maximum volume limit

Maybe you are looking for

  • MovieClip buttons inside a MovieClip button inside another MovieClip button

    I am trying to make a Portfolio of my study abroad experience and can get something right about the movie clip buttons inside each other. I have a button to click on titled "travel" and a window shows up with more movieclip buttons to organize differ

  • Need Help in iPhoto '11 Help??

    Hi, i have updated my iPhoto '11 to Version 9.2.1 (628). And had to lookup a topic in iPhoto '11 Help, and it says "To see all iPhoto Help, you must be connected to the Internet". Then I tested Browse Help topics, and the result I get are all the sam

  • Down payment Invoice is not being shown in Credit Memo option

    Hello Experts, I want to make a credit memo against Down payment invoice, but it is not being Drawn by COPY TO option in Down Payment Invoice form and not being Drawn from COPY From option in AP Credit Memo form. Please help Thanks Edited by: Shazad

  • Still having trouble with Adobe Viewer

    I'm still having the issue that when I have multi state objects, (state 1 is off the page, state 2 is on the page) the hidden state (state 2) is showing up on the iPad Adobe Viewer when you click the |||| icon from the menu in the upper left corner.

  • Blurry Scroll Bar in Cover Flow. Help?

    Well... i've had my new macbook for about 3 weeks. have about 100 songs in there so far. on itunes. today my friend sent me mp3 files and the moment i got them i put them in itunes. the problem is i discovered that after putting the songs on itunes,