Stopping program without waiting for trigger

Hi everybody
I have a problem that I just can't get my head around. I have a program that I use to aquire data. The program goes through the motions of waiting for the trigger, aquiring the data on the appropriate channel, displaying it, and loops back to waiting for the trigger. The problem is That when I want to stop my program while it is waiting for a trigger I must wait for it to recieve a trigger before it will stop excution.
Is there a way for my program to stop the trigger vi when I select to end the program?
Thanks
Beaton
- there is always an easy way, but it is always the hardest to find

Hi Beaton,
you have to split the 'wait for trigger time' into shorter sub-steps.
Let's say you wait 10sec for trigger signal. Make a loop instead waiting 1 second for 10 times! After each iteration you can check for: 'break the loop (end program)' or 'trigger received' or 'any other error occured'. This way you can stop your program very easily - you can also make your own error state saying 'Error number 123456: stopped by user'...
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • Extra empty groupName in TDMS file when using DAQmx Start New File & stop DAQmx while waiting for trigger?

    I wrote a VI that listens to an external trigger coming from a PFI line and saves a user-defined number of pretrigger+posttrigger samples into disk, and then the DAQmx restarts to wait for the next trigger. I used the DAQmx Start New File.vi to change the filename of each of the next file. However, I found that for each of the resulting TDMS files, there is an additional group that is added in addition to the real data. For example, if the groupName is set to "task_voltage", then there is an additional groupName called "task_voltage #1".
    I suspect that this is because the program preallocate diskspace using the old filename for the pretriggered samples, but when the trigger happens and the samples are ready to be written into disk, an actual new file is opened and saved. The reason I think this might be the case is because, say each file would be 50kB and I already have 1 file triggered and saved, before the second trigger comes in, I can see that the file size of the first file is twice as much as it should be (100kB), but the file size will return to noraml (50kB) after the second trigger happens and a second file is created.
    Does anyone know if this is really the case? Is there a way to configure the task so that this doesn't happen?
    Another question I have is that the program currently set up so that the VI will wait until a trigger happens to return the values. However, this means that if a trigger doesn't happen, the VI waits indefintely, and the "stop" button in the while loop is useless. I have to use the "Abort Execustion" button on the tool bar to stop the VI. Is there a way to interrupt and stop the DAQmx task even if the trigger doesn't happen?
    Thanks in advance for any help!
    Attachments:
    pretrigger_loop_new_file.vi ‏29 KB

    I don't believe there is a way to programmatically change/delete the group name in a TDMS file. What you can do however, is convert between TDMS and TDM using the VIs found in the Data Storage palette and then perform whatever modifications you need using the TDM utilities.
    Applications/Systems/Test
    National Instruments | AWR Group

  • How can I download a transfer without waiting for it be all transferred?

    How can I download a transfer without waiting for it be all transferred? Thanks.

    Thanks, that now makes sense. Once an item enters the download queue, the user cannot remove it. Either let it complete the download (easiest) or contact the iTunes Store customer support department through the Contact page (select the category and subcategory closest to the issue you're reporting and you'll find either an "Express Lane" button - just follow the instructions to get to the contact form - or an "Email Us" button) and ask them if they'll remove the item(s) from your queue for you.
    Regards.

  • Want the program to wait for some sec

    Hi,
    I'm trying to get a kinda sweeping effect with a couple
    of images. I need the program to wait X amount of
    millisec before it shows another image.
    How can I do this? I've tried using sleep and delay
    but I can't get it to work. I'm not using any threads.
    I just want the program to wait for a moment.
    Thanx

    try {
    Thread.sleep(millis);
    } catch (InterruptedException e) {
    }

  • Sync without waiting for backup

    I have looked around in "Preferences" but I cannot seem to be able to find any way to sync my iPad without waiting for a slow backup.  My iPad has been backed up hundreds of times.  I don't feel the need to do it every time I sync.
    iTunes version
    11.2.2 (3)

    I just tried it with my iPhone.
    I don't see a dialogue box.
    Do you mean at the top where I have placed a red arrow?
    That's not an X, it's something else and clicking on it does nothing.

  • How to make a multiple request without waiting for a response in java ?

    A more specific question:
    how to make a multiple HTTP request without waiting for a HTTP response in java (using httpURLConnection)?
    Thanks

    Thanks for responding.
    But i want to make further request to the same resource URL. I want to reuse the connection, don't want to create a new connection for each of individual request.
    How can i do that using HttpURLConnection ?
    Thanks.

  • My iphone phone wont turn on and when i plug into computer it wants to restore then gets stops at the 'waiting for iphone' what do i do? not jailbroken not damaged? HELP!!!!!

    my iphone phone wont turn on and when i plug into computer it wants to restore then gets stops at the 'waiting for iphone' what do i do? not jailbroken not damaged? HELP!!!!!

    i have, its connected to my sisters computer,it starts to restore then says there was a problem downloading the software for the iphone, the network connection has timed out. what does this mean?

  • Is there a way to passcode lock my iPhone without waiting for the preset idle time?

    Is there a way to passcode lock my iPhone without waiting for the preset time?
    My iPhone is set up to require a passcode after 15 minutes of idle time. Normally, this setting works best for me. However, there are times when I would like to lock it immediately, without waiting for the 15 minutes of idle time to pass. Is there a way to do that easily, without changing my settings? I know that I can click the power button to immediately kill the screen, but that just defaults to "slide to open" with no passcode required.
    Just to clarify, the idea is to leave my 15 minute setting, since this is the way I like it 98% if the time. I'm just wondering if, let's say I am resting my phone down while a curious person is around, I can quickly pass code lock it, much like I could just click the power button to put it to sleep.

    Unfortunately, my phone doesn't ask for the passcode when I do this (just slide-to-open). I've searched settings, but I don't see any way to set it up to require the passcode after the screen is locked with the power button.
    Do you remember how you set your iPhone up to achieve this?

  • Can i store my music on my device without using my data in my phone plan streaming from the cloud? How do i put what I want on there without waiting for each song to download from the cloud one at a time?

    How can I store the music I listen to on my iphone without streaming it from the cloud and using all my data on my phone plans?  How do I dump it on my phone all at once in itunes rather than waiting for each song to download individually from the cloud?

    What??  You asked how to get all your music on your phone at once rather than downloading it to your phone from iCloud.
    Go to your purchased list in iTunes and download all your music to your iTunes library, as explained in the linked article.  Then sync it all to your phone using iTunes you're done.  The music will be stored locally on your phone and you won't have to download it again in the future.

  • I have Iphone 3g,sometimes songs disappears then reappear.I try to sync the songs from library on my laptop and nothing happens.How do I get my music back without waiting for it?

    I have a Iphone 3g,every now and then some of my music will disappear then reappear.I've tried to sync the music from my library on my laptop,nothing happens.How do I get my music back,without having to wait for it to reappear?

    Define "I cannot transfer songs."  What exactly did you do, and what exactly happened?
    Did you authorized iTunes on your computer and sign into the same iTunes account as your phone (and the one the music was purchased under)?

  • Calling another program and waiting for output

    Hi,
    I'm writing a program that passes a file created for an application called Net Sim but has to wait for the output. Net Sim lies in another directory from the java files and I don't know how to call the program with the file created as a parameter, such as:
    ns2 network1.tcl
    where 'ns2' is the dos command to run net sim and 'network1.tcl' is a file passed as a parameter to the program.
    I've tried
    try{
    Runtime r = Runtime.getRuntime();
    r.exec(" <directory> ");
    }catch(IOException e){
    System.out.println("Error " +e);
    This doesn't work though and I could use some help, as well as how to save the file created by the program in another directory.
    Finally, I need to know how to make the program wait for the output from net sim which is a file I intend to use. Can I do this with a while loop etc.?
    I thank you in advance for any help,
    Regards,
    Gary.

    Here's an article from JavaWorld describing some of the pitfalls when using Runtime.exec() that might help you:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Sending a request to a servlet without waiting for a response

    Hi,
    I have a client application that needs to send information to a servlet for processing. I would like to be able to send the information in question without having to wait for a response from the servlet. The reason for this is that I want to speed up the "sending" process. I know that http communication is based on TCP which is a connection-oriented network protocol, but I thought maybe there was a work-around to this.
    Thanks in advance for your help,
    Chris

    There r two ways to do this. First, if you can modify the application simply don't wait for the response do whatever you want and ignore the response. If you need the response in order to continue you will have to wait, but you can do this in a separate thread, while the main thread can do other things.
    Second, if you can't modify the application but you can modify the servlet, make the servlet respond as quick as possible, doing the work after having answered. Once again if the application needs the results of the process there is no way, you'll have to wait.

  • SAINT freezes, program SAPLSTPA waiting for gateway, function CMRCV

    I try to upload the ST-A/PI patch with SAINT but it freezes, seems that program SAPLSTPA is waiting for a RFC or whatever.
    Did anyone had this problem?
    do you remember how to check those logs (the import logs) I dont remember well where are they placed
    thanks

    Hello,
    You canstart from transaction code SM50 to see if any workproces in on RFC Hold status. If not, you can go to /usr/sap/trans/log to find the latest log. The import log name is SAPIxxxxxx (xxxxx is the transport number like SAPKxxxxxx).
    You can also check if there's any TP or R3trans hanging, and in SM37, if there's any RDD* job canceled, and inSLOG, if there's any deadlock in /usr/sap/trans/tmp directory.
    Anyway, start with SLOG and do some analysis you might find something.
    Regards,
    Joe

  • Dynamic start of subvi without waiting for end of subvi

    How can I load and run a SubVI without waiting in the MainVI for the end of execution of the SubVI.
    Im running LabVIEW Prof. Dev. System 6.1 on WindowsNT4.0

    Use the Open VI Reference to specify the VI and then an invoke node. The method you want is Run VI and you can optionally Wait Until Done.

  • Wait for trigger

    Hello
    I need help making a VI for waiting for a trigger. I am working with a TDS 2024 scope.
     I have to tell  the scope how long to wait for the trigger and if it does not find it in that time, then it will tell the user that no trigger was found.
    Can anyone help me with this?
    xxmidna

    Midna19 wrote:
    Hello
    I need help making a VI for waiting for a trigger. I am working with a TDS 2024 scope.
     I have to tell  the scope how long to wait for the trigger and if it does not find it in that time, then it will tell the user that no trigger was found.
    Can anyone help me with this?
    xxmidna
    Time to break out the scope manual and see what commands are needed to achieve this.  Put a VI together and then we can talk about refining it. 
    Alternatively, you can see if you can find some drivers for this scope.  I think Tektronix has pretty good LV support.
    (This assumes you know how to use the scope.)
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

Maybe you are looking for