Pause and Killswitch suggestions

The attached image is not a finished product, but should give you a good idea of what I want the program to do.
The basic purpose of the program is to control a function generator to do a frequency sweep (yes, the driver/generator has a sweep function available even though I don't use it, I just use labview to do the sweeping instead, is this a bad way of achieving the sweep?)
The program needs to be able to 1) pause at any time so that the user can adjust the amplitude of the signal and 2) it needs to have an output killswitch as well, so that with a button click the amplitude immediately turns off, but will restart from where it was when I hit continue.
To achieve this I have made 2 case structures with buttons and I want your advice/feedback on how I have chosen to program this.  Again, the program isn't nearly finished, just trying to figure out how I am going to set it up.
Also, the error handling is not completely set up yet, should I send it through both the pause loop and the killswitch loop as well as the driver up top that sends the device the data?
Attachments:
RS101.JPG ‏79 KB

So I started playing with an event structure and I am running into a problem (I also took out the actual instrument drivers and replaced them with indicators so that I can test run the program and see what is sent to the device).
In the image, the main "for loop" is excecuted when the run button is clicked at the bottom - this works fine.
The "pause loop" has not been formatted for the event structure yet (I have an issue with the "Kill Output" function that will also be a problem with the pause function, so I will get to that).  The pause works pretty well as it is, it will pause the "for loop" until I tell it to continue and it will replace the old amplitude with the new one, but I would like to make it so that the pause is an event.  More on that in a second.
The "kill output function" is an event handled by case 1 (case 1 not shown, there isn't much to it anyway, especially without the driver).  The problem I am having with this is that it will not excecute until after the for loop has completed, and that is no good.  I need it to work just like the pause function shown, to interrupt the for loop and execute the kill output event.  Unlike the pause function, it does not have to resume the for loop after excecution.  If I can't interrupt the for loop, then I cannot use the event structure and will have to go back to the way it was.
There is another issue with the "pause loop" that I will run into if I make it an event instead of a case structure, and that is the shift registers that go through it (I made the wires thicker to highlight it).  If the "pause button" is false, the "amplitude" just gets passed right on through the structure and does not change, but if I press pause then the "new amplitude" is sent to the shift register instead, and I am not sure how to pass data through the event structure like that.  Also, upon completion of the "pause" the program needs to resume where it left off in the "for loop" without losing its place... not sure how to do this with the event structure either.
Advice is appreciated, and pictures are wonderful
Attachments:
RS101.JPG ‏110 KB

Similar Messages

  • Lately I've noticed that videos on my iTunes aren't syncing sound with picture - lots of delay and pausing.  Any suggestions?

    Lately I've noticed that videos on my iTunes aren't syncing sound with picture - lots of delay and pausing.  Any suggestions?

    You migh give resetting your NVRAM a try:
    http://support.apple.com/kb/ht1379

  • I downloaded quick time becausei tried watching a movie i purchased on itunes and and have watched it before on my laptop but paused and continued. i tried opening it today and it said i needed to download quicktime and i did. it still says i need to

    I downloaded quick time because i tried watching a movie i purchased on itunes and and have watched it before on my laptop but paused and continued. i tried opening it today and it said i needed to download quicktime and i did. it still says i need to download it, what do I do

    Hi morgangang,
    Although that message is not listed in the following article, I would still go through it for help.  Things like installing in safe mode may help.
    QuickTime: Windows troubleshooting tips
    Troubleshooting Tips
    Make sure your computer meets the system requirements.
    Try running ScanDisk to verify that the directory is OK. This is an important step to take before installing any software.
    Try running the stand-alone version of the QuickTime installer in "Safe Mode." It is available here. This can help to isolate issues with background applications, and some driver conflicts.
    Make certain you have installed the most recent drivers for your sound and video cards. Even if you have a "brand new" computer, it is not guaranteed to have the most recent software installed. Contact the manufacturer of your sound and video cards for additional information.
    Make certain you have installed a recent version of DirectX.
    Errors are usually related to software conflicts, unusable files, or incompatibilities. They can also be related to specific hardware combinations, and sometimes the way in which the hardware is configured. Keep in mind that an error message does not necessarily point to a particular cause or solution. Since there can be many different causes for a particular symptom, some suggestions may not work, and you may need to discover a solution on your own.
    Note: Please contact Microsoft Corporation or your computer vendor for help configuring Microsoft Windows.
    Thank you for visiting Apple Support Communities.
    Nubz

  • How can I make easier case structure? Or can it possible to have one Pause and reset button in same structure.??

    hello,
    I am tring to convert my main test vi in case structure so latter on i can make some changes in that for example i want creat one pause button and reset button in that.
    I am not so much familer with case structure i want your guidence that how can i make my vi in globle case stucture in that i m having case 1 ,case 2...
    i already tried for that but then i got confused.
    here i am attaching my .llb file in that aa.vi is my main testing vi.
    will you plese guide me so i can make confort vi in case structure.
    Or can it possible to have one pause button and one reset button in same stucture,so User can pause or reset execution at any time when they want.
    Thank you very much in advance.
    Attachments:
    aa.llb ‏3338 KB

    Hello,
    I have change my entire structure ,now is it possible to have pause and reset button.
    here i have attached my changed vi.
    if still any changes required then please suggest me.
    Thank you.
    Attachments:
    aa.vi ‏75 KB
    aa1.llb ‏3333 KB

  • Slideshow Missing Forward, Pause, and Back

    In place of forward, pause, and back arrows there are blue boxes with question marks. Any suggestions as to how to get the images back?

    The pictures are from a central source at www.mac.com.
    http://www.mac.com/1/slideshow/images/pause_on.png
    Since www.mac.com doesn't work properly, no images.

  • ITunes playback skips, pauses and distorts

    Recently I haven't been able to use my itunes for playback through my desktop because the songs pause and skip, and in some cases I get loud distortion or static. Previously it had been working fine for 18 months. I deleted the program and downloaded it afresh: the first song was OK but then the problem recurred. My operating system is XP. Can anybody suggest a solution?
    Other programs on the computer are working normally although possibly a bit slower than they were. Are there viruses or other nasties which attack iTunes in particular?
    PC generic   Windows XP  

    Problem was with iTunes libary (xml) file and not Firefox. Once I rebuilt my library from scratch, iTunes no longer skipped.

  • Can I add the Play/Pause and Mute functions to image buttons

    A custom skin that was created to wrap around a Captivate
    movie we are creating does not include the playbar, but does have
    both a Play/Pause button and a Mute button, both of which are
    normally located in the playbar. We want to create custom image
    buttons for these actions and assign the Play/Pause and Mute
    funtions to them. Can anyone suggest how we might do this? I
    suspect that the answer lies in creating Javascript that will
    accomplish these funtions. Any suggestions would be appreciated.
    Thanks.
    JazzzAl

    Does anyone know if it's impossible?

  • Player pauses and skips with .mp4 files from video camera

    As you will tell, I'm a total novice at this video stuff. I just purchased this new Sanyo HD1 video camera. It creates .MP4 files and says they can be played with QuickTime (included with on the CD!). When I play the clips with QT, I get terrible playback - video/audio pauses and large chucks of video just drops. I've tried the clips on a variesty of high end machines (latest version of QT) with the same results. Interestingly enough, if you use the product that also comes on the CD for viewing (ULead) - everything looks smooth. I'd rather use QuickTime and go Pro for those features if I can get it to work. Suggestions?
    Sony Vaio 3.8Ghz, 1G Ram   Windows XP  

    I also have this same problem and have found I can get the file to play if I select the "add to selection and scale" option under the edit tab. However when I exit and save the option I still have to select the option on the same file the next time I open it in order to get the file to play.
    What is the fix?
    Dell   Windows XP Pro  

  • Pause and Continue Cycle

    Greetings,
    I want to be able to pause a cycle and continue later.
    For example, I have a program that does calculations for ever and ever and keeps printing stuff in the console.
    I want to press a Key, pause the cycle, and then be able to type the program commands on the console.
    If I type the command "continue", the cycle continues the calculations.
    Here is the sample code.
    Code:
    public class Testes {
    public static void main(String[] args) throws Exception {
    int i = 0;
    boolean run = true;
    BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
    String inputString;
    while(true){
         if(run){ 
    //calculation sequence
              i++;
              System.out.println(i);
              //???something so that if some key was pressed, "run" becomes false
         else { 
              while(true){
              inputString = input.readLine();
              if(inputString.equals("run")) {run = true; break;}
    I would like that the solution satisfy 3 conditions:
    1- Very eficient, that is, the calculations will take days so the solution can not make the program "slower" on normal operation (performing calculations) (low overhead)
    2- When user press pause, the program only stops after the last instruction of the calculation cycle. That is, all paused states are coherent/atomic. All calculations of that interaction were made. (I guess this doen't allow thread-based solutions, which I am glad if I can avoid)
    3- THe simpler the better. For example, after calculations can't i check if user pressed any key, but if not don't wait until it does? this would be enought to solve this, but all java input functions wait for users to type.
    Thanks beforehand.
    Greetings

    If you're just looking for enter, you should be able to use System.in.available() and then System.in.read() if it's non-zero. The problem, I believe, is that some systems don't push any input until you press enter.
    You could also do it with a GUI and KeyListener.
    However, I don't know what kind of performance impact the available()/read() loop will have. Your best bet is probably to have a simple thread situation with one that's just blocking on any keyboard input and the other that's running the calculation. Then again, if your calculation is taking days, I don't know whether the performance impact of those extra loops will make a difference. Test it, and if you can avoid the threads, go for it. I put this example together as an experiment (leaving out the non-threading code):
    public class Calculation extends Thread {
        public static void main(String[] args) throws IOException {
            Calculation calc = new Calculation();
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            // Start calculating on the other thread
            calc.start();
            // Loop waiting for keyboard until calculation finishes.
            // readLine() is blocking, so this only loops after input is received.
            while(!calc.isCompleted()) {
                reader.readLine();
                synchronized(calc) {
                     if(calc.isPaused()) {
                         // If it's already paused, unpause and clear the wait().
                         calc.setPaused(false);
                         calc.notify();
                     } else {
                         calc.setPaused(true);
        public void run() {
            setCompleted(false);
            setPaused(false);
            try {
                // Loop until completion -- this keeps it going after unpausing
                while (!isCompleted()) {
                    // Check for pause and completion before each step. This keeps it atomic.
                    while (!isPaused() && !isCompleted()) {
                        runCalculation();
                    // All we know here is that it's either paused or completed.
                    // If it's completed, keep going to finish the loop.
                    // Otherwise, wait() until notified.
                    while (isPaused()) {
                        synchronized (this) {
                            this.wait();
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
    }This probably isn't the cleanest code (suggestions welcome) but it does work. If I was doing this for real, I'd break up some of these nested blocks, for example. Only problem is that it requires you to hit enter at the end after it completes, too.

  • Rented Movies pause and skip during playback......................

    I am running iTunes 9.2. The last three movies I have rented pause and then skip ahead 6 seconds during playback. Its like with compujter cannot keep up. It happens at ramdom times but happens often, sometimes two or three times a minute. All movies were completly downloaded before playback. Any suggestions?

    I am having the same problem with purchased video content.
    I am NOT a happy camper right now. I was really looking forward to purchasing a season pass for one of my favorite programs, but not until this is resolved
    I also can't figure out how to play the itunes purchased videos directly in Quicktime. It used to be possible in preferences, but it looks like that feature is missing from this current version.

  • Pausing and spinning wheel

    my i mac recently likes to pause and the colored spinning wheel likes to keep my blood pressure up. I have os x 10.7.5, 2.5 ghz core i 5, 4gb, 429gb out of 499 free. I have cleaned up what i could (pics,music........). Dont run alot of apps pretty casual user. And I have vacuumed all open areas of the monitor. What can I do to stop this annoying issue. Thanks for any suggestions provided.

    RevoHD7, I ended up taking the machine to an Apple store and they ran a diagnostic on it...  Although their diagnostic did not indicate such, they agreed it seems there must be an issue with the logic board, and therefore getting a drive into it and installing an OS is not even a possibility until the logic board ( i.e., Mother Board) could be fixed, which isn't happening.  Since the machine is no longer supported they were not willing to intake the machine for repair.... ::argh::  Now I have a very large, heavy, and obsolete paper weight.  How frustrating.  One day a very important machine in my studio, the next day a paperweight.  At least with a PC I could salvage parts and build a new machine.....  Too bad Microsoft OS's are so AWFUL.

  • Flash player plays videos slow and jumpy.  Have to put on pause and wait for it to load.

    Since the new Flash Player release, videos on Youtube, CNN, FOX will start to load then do a buffering, then play a little more, stop again.
    When I hit on pause and let it load fully, it is the only way I can watch the video.
    Unless it is a video I really want to watch, the effort takes to long.
    It started with the new release of Flash Play on both my desktop with windows XP and new laptop with Windows 7.
    I have spent days reviewing this forum and tried all your suggestions.
    Are there any new suggestions besides all those that have already been given or do we have to just wait for a new release of Flash Player
    to take care of all these bugs that I have been reading that others also have?

    Hi eidnolg,
    I have great news on my end for this problem.
    Researching another solution all started with the email that I received from adninjastrator ( [email protected])
    about it might be something with my internet server and HiDef videos.
    I phoned Qwest help line and they told me my speeds coming in for okay.
    Then I sent a email to a Qwest online tech and explained how it all started about the time of  the flash player update on both of my computers.
    I told them about all my trouble shooting on your forum.
    Within 2 hours of my email, I got a reply back from the Qwest tech.
    Quote from Qwest internet provider, email response:
    I understand you are having concerns about your speed.
    I have spoken to an engineer and we have made some changes.
    You should see immediate results.
    I went to Youtube, CNN and FOX and they all worked.  Hooray!!!!!!!!!!!!
    I don't know what programming problem that they fixed, but it worked.
    Thanks to adninjastrator for getting me started on checking with my internet server provider.
    Thank you eidnolg for all your suggestions for solving this issue.
    It was also a learning process for me, doing research on checking for computer problems.

  • At you tube display video window but did not appear play, pause and sound bottons

    at you tube display video window but did not appear play, pause and sound buttons, last night i watch the video at you tube perfectly.

    It looks like a driver related issue specifically the video card driver. I suggest that you scan your computer with RadarSync so that you will know which drivers need some updating. Once you some results, you can either Google the updates or go to the HP's support website to get the latest updates or you can use RadarSync to update automatically. I hope this helps! David

  • Random Pauses and Skips in Playback

    Apparently others are having a similar problem. I get random skips or pauses in songs on playback in the iPod; mostly, these pauses are minute hesitations that will grow more noticeable over time to the point of even skipping songs or just stop playing in the middle of one. This anomaly occurred in a 3G 40GB and my current color 60GB. Music totals about 28 GBs of mostly ripped Apple Lossless, 192 ACC, just a few mp3s and some purchased tunes. I do not believe this is a headphone issue, as it will "skip" regardless of headphones or cable connected even when the iPod is completely stationary. Playback of the same music, even streaming over Airtunes, reveals no skips in the "original" music in iTunes to which the iPod is connected and synced.
    Restoring the iPod only lessens the severity of the pauses (and believe me this has been done many times). I have also deleted iTunes libraries, xml files and preferences, but none of this seems to make any difference. Both the iPod and iTunes source drives have gone through the disk maintenance of DiskWarrior, repair permissions (source drive) and so forth.
    Occasionally, after Restoring and on the initial sync of the iPod, I get the error message "Cannot read from or write to this disk". The 60GB iPod is less than a month old and I shows no disk problems; the same problem occurred with the 40GB iPod. Occurs with both the USB2 and FW ports.
    Any suggestions would be greatly appreciated. Thanks.
    PGE

    Apparently others are having a similar problem. I get random skips or pauses in songs on playback in the iPod; mostly, these pauses are minute hesitations that will grow more noticeable over time to the point of even skipping songs or just stop playing in the middle of one. This anomaly occurred in a 3G 40GB and my current color 60GB. Music totals about 28 GBs of mostly ripped Apple Lossless, 192 ACC, just a few mp3s and some purchased tunes. I do not believe this is a headphone issue, as it will "skip" regardless of headphones or cable connected even when the iPod is completely stationary. Playback of the same music, even streaming over Airtunes, reveals no skips in the "original" music in iTunes to which the iPod is connected and synced.
    Restoring the iPod only lessens the severity of the pauses (and believe me this has been done many times). I have also deleted iTunes libraries, xml files and preferences, but none of this seems to make any difference. Both the iPod and iTunes source drives have gone through the disk maintenance of DiskWarrior, repair permissions (source drive) and so forth.
    Occasionally, after Restoring and on the initial sync of the iPod, I get the error message "Cannot read from or write to this disk". The 60GB iPod is less than a month old and I shows no disk problems; the same problem occurred with the 40GB iPod. Occurs with both the USB2 and FW ports.
    Any suggestions would be greatly appreciated. Thanks.
    PGE

  • Firefox has suddenly gone wrong. I was successfully running both Firefox and Internet Explorer 8 on Windows 7. I auto-accept upgrades including the most recent Firefox upgrade and the suggested upgrade to Adobe Flash 10.1. But after this, Firefox stopped

    Firefox has suddenly gone wrong. I was successfully running both Firefox and Internet Explorer 8 on Windows 7. My laptop is new and has plenty of RAM and HDD. I auto-accept upgrades including the most recent Firefox upgrade and the suggested upgrade to Adobe Flash 10.1. But after this, Firefox stopped working and does not work when I re-load Firefox 3.6. Also IE8 now works very slowly and does not locate major websites like Microsoft without a 'can't find the website message' and having to pressing Return a second time. When I do get to the Mozilla website and click on the button to try to download Firefox 3.6.6, I get this message "Oops! Internet Explorer could not find mozilla3.snt.utwente.nl". Can you help with what has gone wrong? As it stands, I can't use Firefox at all. Note: because Firefox did not work after the upgrade, I've downloaded the IE8 version of the Adobe Flash 10.1. What I really want is to be able to use both Firefox and IE8. But is this possible if they use different versions of Adobe Flash?
    == This happened ==
    Every time Firefox opened
    == About 2-3 days ago ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; .NET4.0C)

    I have been having the same problem as the original poster. After upgrading to Ffx 3.6.6, the program asks you to upgrade to Flash Player Plugin 10.1. I download and installed 10.1 only to find videos weren't loading.
    In my case, the problem is the previous installation of Flash Player (9.0.47) was somehow messing things up. To fix this, because I already had Flash plugin 10.1 installed I had to uninstall 10.1 using the uninstaller from adobe and then manually remove any files related the old flash player plugin 9.0.47
    Here is a run-down of my process:
    0. To check if you have a previous installation of the Flash Plugin lurking around, in Firefox go to Tools -> Add-ons -> Plugins (tab). At this point you may seen both Flash plugins.
    1. Proceed to uninstall Flash Plugin 10.1. Adobe provides an uninstaller here: http://kb2.adobe.com/cps/141/tn_14157.html
    ( you have to make sure you have nothing running when you execute the installer).
    2. On my Mac (sorry I don't know what it is in Windows) I searched the hard drive for any files/folders with "Shockwave". I found a folder called "Shockwave 10". It wasn't removed by Adobe's uninstaller. For safety I deleted it and then emptied the trash.
    3. I then went to My HD -> Library -> Internet Plugins.
    Remove the file and folder named "Flash player.old"
    4. Restarted; ran the Adobe Flash Player 10.1 installer. Restarted again.
    5. Opened up ffx and double checked the plugins list (see step 1). Version 10.1 is installed and available. Went to problem sites to test it out and Success!
    Hope this helps.

Maybe you are looking for

  • Problem resolving host name.

    Hi all, How can I resolve some host name's IP address? Example: I've got the host name "java.sun.com" and I need to know its IP address. How can that be done? I first thought about InetAddress addr = InetAddress.getByName("java.sun.com");but it threw

  • Keeping Photos in Photostream in Aperture When Photostream is full

    Hi folks, I've searched around and can't find an answer to this: I've got Photostream set up to sync with Aperture from my phone. At some point several thousand photos in, Photostream is going to start deleting the old photos and replacing them with

  • Need code for Sales order creation in oops using xi as integration server

    Need code for Sales order creation in oops using xi as integration server.

  • Sap isu device management

    Hello experts, Kindly expain how to create the master data in sap isu device management. as i am using oracle base software and now i want convert it to SAP ISU DEVICE MANAGEMENT, so firstly i have to create master data then interface program. am i r

  • Compiling c++ files for windows

    I have a c++ program that I would like to compile windows binaries for. I have tried installing mingw32-gcc, and using g++, but when I run the binaries (in wine or from windows), I get errors that certain .dll files are not found. Is there additional