Stop the multiple loop without delay to the cRIO

Hi all

the VI in cRIO has a large loop, it contains 4 small while in parallel to the work loop. In every little while, they have a stacked with a lot of frame sequence.
I want to stop everything with only one STOP button on my host live. But when I press STOP, I have to wait for all the small loops completed their charge and finally the big one can stop. Is there any solution to immediately end all?

Thank you very much

d4nvjpl0ng4n wrote:

the VI in cRIO has a large loop, it contains 4 small while in parallel to the work loop. In every little while, they have a stacked with a lot of frame sequence.
I want to stop everything with only one STOP button on my host live. But when I press STOP, I have to wait for all the small loops completed their charge and finally the big one can stop. Is there any solution to immediately end all?

1. you should not have the large loop.  Which is just to add unnecessary complexity.

2. you hit the major problem with the Structures of stacked sequence: everything must go before it is complete.  The solution is to use a State Machine.

Tags: NI Hardware

Similar Questions

  • Why is the Table in the loop without delay time flashing

    Hello everyone

    Why I put Table in the loop without any delay, the front table still flashes?

    How can I avoid this situation?

    This situation is related to the level of the PC?

    Hello

    This problem was presented as a request for corrective measures, several years ago although there always seems to be involved.

    Sometimes this is because the table is constantly updated, but at a slow pace, enough to be visible. If you place a Boolean button on the table on front panel indicator and make transparent (I used a Cancel button that uses a locking mechanism when released), this will force off update screen and flashing minimum.

  • Stop the cRIO or sbRIO via command software

    Hello

    After a little digging around I still not found a software command to stop a cRIO or sbRIO. There is a restart vi, but not a stop. I wonder if I missed something that someone may know.  For a RT Linux RIO it may be possible using a Linux command, I wonder? And for a VxWork, an idea? THX

    L.

    In general, it does not resemble the power management is not very well supported. Looks like there is a command to do it on Linux RT systems:

    How should I stop OR Linux Devices in real time?

    http://digital.NI.com/public.nsf/allkb/55A17D8F99D96ECC86257CEF004F4588?OpenDocument

    I have done some research and there is a little more information in the following forum post, and it seems that there are some utilities for Windows that are not available for RT.

    The start distance and stop the controller SMU running Labview RT (WoL)

    http://forums.NI.com/T5/LabVIEW/remote-startup-and-shutdown-of-of-PXIe-controller-running/TD-p/24496...

  • stop a loop without waiting for its next iteration

    I wonder if there is a good way, or still anyway to stop a while loop without waiting for its next iteration. Lets say you have a timer in the loop so he iterates once evey 10 seconds, and then you have to wait 10 seconds for him to stop after you press a stop button that could be a problem.

    Thank you!


  • The call of a Subvi without stopping the execution of the main thread

    Hello everyone, I have a rather simple demonstration VI, which opens a menu where the user can call a few screws, signal generation, reading and analysis, each contained in a Subvi and with their own front panel and chart controls. The idea is user just click a button and the required Subvi is in charge, I use a structure of the event to ease.

    Problem is, after I opened an option, said Subvi hogs the thread of execution and does not allow for new bodies until it is closed (this is inside a while loop it is so logical, I guess), the queue of events and the next before Panel charges only after that I have stop the Subvi. I would like to be able to simply open the front panels and let them run in parallel, without them in the meantime another at the end, is it possible?

    natasftw is right.

    A high school is a "hole" in your main panel.  You "insert" a separate VI in this 'hole' and then you see the Panel of VI inserted through the hole and mouse clicks through the hole of the Subvi below.

    You will need to run the Subvi separately, even if - by inserting just can't run.

    Aynchronous call will begin a Subvi running and then return to the calling thread with the Subvi running in parallel.

    You can then insert the Subvi in a secondary, or let it have its own window, as you choose.

    There are examples of both techniques.

  • Disabling update the configuration file without stopping the VI

    I would like to perform a function that when the new modules are added in the existing system of the public Service or hot swapping modules autour, the VI can update its configuration file. I don't want the VI to stop we will collect data 24/7.

    I use cFP2220 and two or three modules of different types. I have my work VI and it is fairly straightforward FP read.vi in a time loop. All data are stored in the database using the Labview database tool. My screws are hosted on the local PC, not on the controller. I'm using Labview 8.6.

    I guess I have to get the file configuration (iak), whenever new modules are added, the iak file can be changed (without MAX aperture). In any case, I would have the flexibility to run the VI continuous. I know there is a similar code here: http://zone.ni.com/devzone/cda/epd/p/id/3221and they get the configuration file in the ini file. But I don't know how it's done as I can save only the configuration file as a file iak for FP system.

    Another potential problem associated with that, I guess, is the database format. For now, I use a three column structure, i.e., DateStamp, value and ChannelID. In this case, if I want to add/remove/swap channels, I can just change the ID of the corresponding channel. What happens if I have a horizontal arrangement of the database, namely 10 columns corresponding to 10 sensors, would he be in trouble if I change channels modules?

    Thank you very much.

    There is a way to change the module and programmatically updated the IAK file without stopping the VI.  You will need to change the FP read.vi front right by with the constant e/s FieldPoint.  You will need to use the Open FP, FP create Tag, read FP, and close to the public Service.  The trick to this is that you must pre-create files IAK in MAX first.  The way to do is to set up your cart in a configuration and then find devices to MAX.  Then save the iak.  Then reorganize your bottom of basket to the next setting would have desired, then have MAX find devices and who save in a file different iak.  You will need to do this for each configuration you have.  Then, you need to place the code below when you want to Ministry the configuration file.  I have also included a screenshot of MAX that you can see what the strings are correlated with.

  • Stop the loop in the process

    Hello

    Once, I am for another question, desire to learn more about labview and these countless obscure secrets.

    Well my problem seem is a common problem, but I have not found the answer in other topics.
    Here are the levels of my (simpler if you look directly at VI) VI

    1st level, I have an event to bring the action or return to the main Vi
    level 2 (during the measurement process), I have an loo whilep with an event case inside to stop the loop if the process is blocked. but it does not work.

    And to make matters worse I can't press the keys at the start of the measure

    I'm on this problem for 10 hours is not a question asked without thinking, but I am really stuck.

    Thank you

    Firstly, stacking of the structures of the event is going to be tricky, very quickly, so I want to disencourage to do until you are an experienced developer of LV. You are currently a little diving on the "first numbers", which is generally understood as the warnings from the structure of the event.

    The second thing is that I understand that you want to terminate the wait function itself (which represents your external code). This can be done. The reason is simple: LV is just waiting for the code complete. So saying LV to stop his execution will happen as soon as LV "took over". This will happen once the external code is complete.

    You CAN complete the thread using the Windows API, but you should / must restart the entire application of the LV to prevent corruption of memory created by the son put to death (not recommended).

    hope this helps,

    Norbert

  • How to get the orientation angle screen with 40 Hz stably without delay to sync?

    Goal: Get orientation angle screen at 40 Hz stably without delay for synchronization.

    Problem with two situations:

    1. When you use the bbutil_swap and navigator_event_get_orientation_angle (event) to get the orientation angle screen with other data such as acceleration sensors and gyroscope data, the sampling frequency will be low grade at 10 Hz randomly. The difference of synchronization will increase from 25 ms to 100 ms.

    2. when the screen orientation angle is collected in the following code to get the angle only, the difference in timing of sampling will be 1, 2 or 5 seconds at random.

    Question: How do I get the orientation angle screen with 40 Hz stably without delay to sync?

    or something wrong in my code?

    Mini code:

    public static void handleNavigatorEvent(bps_event_t *event) {}
    switch (bps_event_get_code (event)) {}
    case NAVIGATOR_ORIENTATION_CHECK:
    navigator_orientation_check_response (event, true); If not the line, no updates on the screen rotation.
    angle = navigator_event_get_orientation_angle (event);
    break;
    case NAVIGATOR_EXIT:
    stop = true;
    break;
    }
    }

    public static void handle_events() {}
    for(; ) {
    bps_event_t * event = NULL;
    If (BPS_SUCCESS! = bps_get_event (& event, 0)) {}
    fprintf (stderr, "bps_get_event failed\n");
    break;
    }
    If {(event)
    If (bps_event_get_domain (event) is {navigator_get_domain()})
    handleNavigatorEvent (event);
    }
    } else {}
    break;
    }
    pthread_create (& t1, NULL, (void *) & rawacceleration, NULL);
    }
    }

    int main (int argc, char * argv []) {}
    screen_create_context (& screen_cxt, 0);
    bps_initialize();

    {If (EXIT_SUCCESS! = {bbutil_init_egl (screen_cxt))}
    fprintf (stderr, "bbutil_init_egl failed\n");
    bbutil_terminate();
    screen_destroy_context (screen_cxt);
    return 0;
    }

    If (BPS_SUCCESS! = screen_request_events (screen_cxt)) {}
    fprintf (stderr, "screen_request_events failed\n");
    bbutil_terminate();
    screen_destroy_context (screen_cxt);
    return 0;
    }

    If (BPS_SUCCESS! = navigator_request_events (0)) {}
    fprintf (stderr, "navigator_request_events failed\n");
    bbutil_terminate();
    screen_destroy_context (screen_cxt);
    return 0;
    }

    Rawlog = fopen (rawfilename, "w"); Save the file in a specific path.
    fprintf (rawlog, "Absorption system, Angle\n");

    navigator_request_events (0);

    While (! shutdown) {}
    handle_events();
    bbutil_swap();
    }

    closeshutdown();

    return 0;
    }

    Thank you for your attention,

    Using SENSOR_TYPE_ORIENTATION of sensor_type_t , you should be able to get > 10 Hz.  Use sensor_set_rate() to get the slower delay to call sensor_info().  Make sure not to enable sensor_set_skip_duplicates().

    However get the orientation at the 40 Hz streaming will not make your application any repsonsive more.  The only way to make your app more would be to manage the orientation change in a short period of time.  This is the time when orientation changes (at the hardware level), to receive you and to deal with it.  It is usually a constraint system and there is not that you can do about it.  What you see using the code above is the same information repeated over and over; FACE_UP, FACE_UP, FACE_UP, which is not really useful.

  • How can I preload the images in the slide show / and also stop slide show loop

    Hello

    I was wondering if someone can help me...

    I have a slide show that is basically like a updated video player up using the effect of scrolling of the slideshow and a sequence of images in the slide show.

    How would I be able to ensure that all the images in the slide show are preloaded before the opening of the site? I tried a bunch of downloaded widgets, none of them does not seem to work, and when I try to scroll the video he returns constantly with load .gif, would like to know how to preload them?

    Secondly, is it all similarly to stop looping slideshow without putting a lot of the same frames at the end? It's just not an effective way to do it.

    no help to any of these questions would be greatly appreciated!

    With a loop, you can use the function summary for slideshow that would stop the loop of the time value is entered in the field back.

    About forcing the contents of the page to load faster, or before any other content, you need to customize this html page.

    Thank you

    Sanjit

  • How do I stop the Animation loop?

    What I'm trying to do, is make sure loading my home html-based page, the logo is lively and makes a sound. When the sound is complete, the logo should stop hosting and be static for all other pages. I have the logo as a .png already on the page and would like people to be able to see the static logo without flash.

    How can I;
    (a) mark the stop animation when the sound is completed (currently it loop a piece of sound and animation loop)
    (b) make the flash animation appear to be those with flash and the .png to those without?

    I don't know if it's relevant, but animation is a glow with the ActionScript 2.0 and the sound is something that I imported to a second 'layer '.

    I download your file and make a few changes. You can download the modified file
    here. (I'll delete it tomorrow)
    You put your sound on a layer - that's why he plays independently. You must set link for object Intro in the library, attach its object of music and then read it. (Or you can remove the library Intro and plays as flow of your server)

    Music = new Sound();
    music.attachSound ("intro");
    Music.Start ();

    That's all!

    If you want to stop the animation on a particular phase, do not stop it here:
    music.onSoundComplete = function()
    {
    _root.box_mc.onEnterFrame = null;
    }

    but he just set a flag and stop the animation inside the onEnterFrame function.
    music.onSoundComplete = function()
    {
    flag = 1;
    }
    and inside onEnterFrame - set something like:

    If ((box_mc.blur > = 30) |) (box_mc.blur<= 4))="">
    if(flag==1) this.onEnterFrame = null;
    }

  • Is there a way to stop the countdown rehearsal before she goes off without open the alarm app and turning works?

    Is there a way to stop the countdown rehearsal before she goes off without open the alarm app and turning works? Basically, if I'm ready to get up and there are 4 minutes remaining on the countdown of repetition which is the fastest way to 'Cancel' the snooze and alarm?

    There isn't a way, I discovered that allows me to do without invoking the alarm and the alarm clearing application

  • goes into infinity "tabs" loop when I type any email 'Contact us' button how can I stop the loop?

    goes into infinity "tabs" loop when I type any email 'Contact us' button how can I stop the loop?

    You use a Mac, or you're on another platform?

    Any other use of platforms:

    • Mac: Firefox > Preferences
    • Linux: Edit > Preferences
    • Windows: Firefox > Options

    Press F10, if the menu bar is hidden under Windows and Linux, or use "> Firefox Options/preferences.

  • Stop the loops with a button

    I have an infinite loop is and display of data. How can I end the loop with a button or a keypress?

    Periodically perform a ProcessSystemEvents() call inside the loop. In a reminder of the STOP button, set a flag to indicate your loop to stop.

    stop unsigned int = 0;

    While (! stop) {}

    data getmeasured

    display the data

    ProcessSytemEvents()

    Sleep (250);   to be polite: it is impolite to spinlock, since you will monopolize the CPU and other threads can get hungry

    }

    then, in the reminder for a STOP button

    STOP the button callback routine

    stop = 1;

  • Deterministic loop is delayed when rewriting continuously buffer of the OD

    Hi all!

    I use the RT for neurofeedback: analyze brain activity and then give hearing feedback from the user in this regard.
    My RT goal is a desktop pc and I use the structure of typical loop of deterministic + not deterministic.

    What I want is a continuous output pure sound. The amplitude of the signal is calculated in real time and is based on certain characteristics of the brain activity of the user. It should vary smoothly to avoid artifacts of type click.

    Since there is no sound screws in the RT module, I use DAQmx writing VI (analog output) with active regeneration. The sample mode is continuous.

    Before the first iteration, I generate a sine wave to an appropriate length (a few hundred samples) and amplitude 1. Then, at each iteration, I calculate the new value of the amplitude and multiply the sine wave with a linear ramp so that I get a smooth amplitude modulation. On the same iteration, I write this new piece of data with the writing DAQmx VI.

    With this approach my timed loop gets delayed periodically, even thought that the cpu load is less than 20%. Rewriting constantly buffer of the device seems to be the problem.

    Is there a smarter way to do what I want? For example: can I write the pure tone only at the beginning and then control the amplitude setting a gain? I saw that there is a property of gain ( http://zone.ni.com/reference/en-XX/help/370469AA-01/daqmxprop/attr118/ ) but I can't seem to find it. I'm using LV 9.

    I'll be very grateful for any ideas!

    Thank you!


  • How to make a loop stop the other in parallel

    I have therefore two loops running in parallel.  When the loop at the bottom is made and stops, I want to stop the upper loop as well.  However, the loop at the top of the page runs in loops of 2 minutes.  I need to run in loops because there is a temperature feedback control, and I need a break to let the temperature change before reading again.

    Now, is it possible that I can interrupt the "expectation" his expectation and finish the while loop?  I tried to look into the structures of the event, but all tutorials just confused me more.

    Also, since we're on the subject, what is the best way to connect the error 'en', 'error' of parallel loops?  I said to use the queues, but I am at a loss as well.  Thanks in advance

    Never mind.  Found a solution:

    http://forums.NI.com/T5/LabVIEW/stop-a-loop-with-wait-timer/m-p/810781

Maybe you are looking for