How do I set priority of a While Loop in RT in a FP2010?

Sorry about a duplicate post. I could not find my post from last night.
I want to run a vi with 2 while loops in my FP-2010 with different priorities. One is time critical running a PID, the other is low priority for communications with a PC host.
How do I set the priorities?
Thanks,
Chris

Put the two loops in two different VIs.  Go to the VI properties and set the priority there under Execution priorities.
In other words, you can set the priority at the VI level and not at the While-loop level.  However, if you want this at the loop level, you may want to take a look at the new Timed Loops.
Hope this helps.
-Khalid
Message Edited by Khalid on 12-02-2005 06:31 PM

Similar Messages

  • How to get the last error for while loop?

    How to get the last error for while loop? I just want transfer the last error for while loop, but the program use the shift register shift all error every cycle.

    What do you mean by "get" and "transfer"?
    If the shift register is not what you want, use a plan tunnel instead.
    Typically, programmers are interested in the first, not last, error.
    Can you show us your code so we have a better idea what you are trying to?
    LabVIEW Champion . Do more with less code and in less time .

  • How to print an array out a while loop?

    Hi all,
    I'm very new with Labview (6h of Practice) and I meet a problem.
    I create a while loop in which a read the first characters of each line of three files and put it in an 2D array (3 rows and 50 lines).
    My goal is to print this array on the VI's panel in a Table or in a Multicolon Listbox. How to do this? In the While loop or out?
    I use Labview 6i.
    Thanks for your help

    Hi,
    I don't see any problems. I suppose that you can get a 2D array of strings from files.
    Now there are three solutions.
    1. Use of Arrays.
    Right-click on the wire with your 2D array and select "Create->Indicator" from pop-up menu. Now you have a 2D array on the front panel which will show you your data.
    2. Use of Tables.
    Select table control from "Controls->List&Tables". Paste it on the front panel of your vi. Right-click on it and select "Change to indicator" from pop-up menu. Then wire this indicato to your 2D array in the block diagram.
    3. Use of Multicolumn listboxes.
    Paste the multicolumn listbox to the front panel. On the block diagram right-click on it and select "Create->Property node" from pop-up menu. The property node of your control will appea
    r in the diagram. Right-click on it and change property to "Item Names" By selectring "Properties->Item Names" from pop-up menu. Now Right-click on the property node once again and select "Change to write" or "Change all to write" to toggle your property into write mode. Then wire your 2D array to this property node.
    The example is attached.
    Good luck.
    Oleg Chutko.
    Attachments:
    Tables.vi ‏26 KB

  • How can I set priority on an individual email in my inbox?

    I have the Priority column open in Thunderbird, but I can't set the priority. How can I do this?

    'Tools' > 'Message filters'
    * click on 'New'
    * give filter a name
    Apply filter filter when:
    * select: 'Manually Run'
    * Select: 'Getting new mail'
    if you want to check for and remove junk first.
    * select: 'filter after junk classification',
    If there is only one condition or if you want to use more conditions that say 'A' AND 'B' must occur.
    * select 'Match all of the following'
    If there is more than one condition or if you want to use two more conditions that say 'A' OR 'B' must occur.
    * select 'Match any of the following'
    you will need to work out what condition(s) need to be met, such as:
    example:
    'FROM' and 'IS' and 'email address'
    to set another condition click on the small +
    Perform this action:
    'Set Priority to' and 'Highest'
    * click on OK to save the filter.
    * make sure it is enabled.
    Message filters run in the order listed. So you need to make sure that you do not have another filter positioned above that filter which could filter emails before the second filter can work.

  • How to make a graph inside a while loop maintain previous values

    In the beginning I was trying to use an the XY Graph Express VI to create a plot of points.  However, the graph is making a linear retrace between the first point of the new line, and the last point of the previous line.  It then creates the new line as desired.
    I have tried using a for loop with to bundle a cluster to the graph, but the graph resets the plot on each iteration (as expected) and I cannot find a way to make it maintain the previous data.  I tried using shift registers but was unable to find out how to do this, and I have also tried bundling the cluster to an array, but cannot figure out how to make the cluster go to a 1D array of a cluster of 2 elements.
    One option is having is finding a way to make it maintain previous data, but the preferred option is to make it create a new plot on each iteration so as to see the color change for each new plot.
    Solved!
    Go to Solution.
    Attachments:
    shift register attempt.JPG ‏64 KB
    original attempt.JPG ‏42 KB
    Output only current iteration data.JPG ‏86 KB

    I'm taking a stab at this because I'm not exactly sure what you want. But I think it is what I have shown here. You need to use a shift register on your outter while loop as I have shown. Your image where you tried using a shift register shows a misunderstanding of shift registers and how they work though, so I would take a look at these tutorials.
    CLA, LabVIEW Versions 2010-2013
    Attachments:
    plot with SR.png ‏29 KB

  • How to create a time control for while loop?

    Hello all,
    I would like to control my while loop's execution time. In other words I want to stop while loop's execution after time (in ms) which is set by user. For example user sets 5 seconds to front panel control and a while loop runs and stops after 5 seconds.
    I am not sure is it possible with the while loop. I succeed with the timed loop but it suits badly to my application. Is there any other loops for timed control if it is not possible with while loop? There is also a simple while loop with Random Number (0-1).vi as attachment.
    Best Regards,
    Jick
    Solved!
    Go to Solution.
    Attachments:
    execution time loop.vi ‏6 KB

    hi,
    see this, may be it will help.
    Best luck
    Gaurav k
    Gaurav k
    CLD Certified !!!!!
    Do not forget to Mark solution and to give Kudo if problem is solved.
    Attachments:
    execution time loop.vi ‏9 KB

  • How can I transfer data between two while loops in parallel

    Hello,
    I have two while loops in parallel and I want to transfer data from the first to the second loop. The problem isthat data are transfered only when the first loop ends. I tried with queue but it doesn't work. How can I do, preferentially without global variable ?
    Thanks.

    I join a very simplified VI's because the real works with PXI, RT, ...
    When you run the "secondVI.vi", no data comes in array from the "firstVI.vi".
    As I said in my first message, I tried with queue too but it doesn't work, because when the terminal go out from the while loop, while loop have to be ended to send data.
    Attachments:
    transfer_data.zip ‏20 KB

  • How to assign higher priority for labview while running other applications.

    HI,
    I am performing 2 time critical counter operations. I am using software time due to the hardware limitation of PCI6013(I have tried all other options). My problem is that I get a erractic value when I use mouse, keyboard or change to other application.
    I found the following link providing a method to provide maximum priority to labview application.But even regular labview users are asked not to use this application. I am not even a regular LABview user.Is there any precaution that I should take to use this VI. I am in need of such an application very badly. Please Help.
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000F5880000&UCATEGORY_0=_1
    5_&UCATEGORY_S=0&USEARCHCONTEXT_TIER_0=0&USEARCHCONTEXT_TIER_S=0&USEARCHCONTEXT_QUESTION_0=priority&USEARCHCONTEXT_QUESTION_S=0

    "Is there any precaution that I should take to use this VI."
    Yes many,
    When you start to experiment with settings priorities in an attempt to avoid the affects of mouse clicks, then you should brace yourself for the application appearing hung. This would happen if LV had a higher priority than the mouse interupt service routine.
    Same applies to the other conditions you mentioned.
    If you go this route, backup before you experiment! Some strange things can happen to your file system.
    I have talked to you about this challenge of yours in another thread. This is what I recomend.
    1) If you can live with your readings being made on only one gear at a time, AND the sample rate being aperiodic, then you MAY be able to use DAQ Occurances and two session. I
    have not done this myself, and AM NOT SURE if it can be done or if you hardare supports it, but maybe;
    a) Open two references to your and configure A so it uses hardware timing (like you already said works good) to count gear A using the other counter as the gate. On the other session you are counting gear B.
    b) Configure both of the above to fire occurances when done.
    c)Start only session A.
    d) When A occurance fires start B.
    e) When B fires start A, etc.
    This will give you determinism on the counts and effectively shift the indeterminism to the update interval.
    If this is not good enough then there is another option. Can you get yourself a nice solid external reference that you can apply as an external gate to both counters? If so you will be using hardware timing and you should be on the right track.
    If these do not work out, you may end up having to go to different hardware.
    Just trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to set priority?

    Hello,
    Is there a way to set a priority symbol or number or anything of the sort beside a message in mail?
    I heard of it being done but I'm not sure.
    Also, how do I use mail and create an out of office reply or an email that will be automatically sent when someone sends an email to a given address?
    Thanks.
    Dorian

    You mean when sending a mail, how do you set priority? Is there a little rectangular box in the lower left-hand corner region of the message header area in your new message window composition window, that has three little horizontal lines and a downward pointing triangle in it? Click on it and select Customize....
    Check the far-right checkbox that has a pull-down menu with a "!" in it. That is message priority. "!!" means high priority, "!" means regular priority, and "-" means low priority.
    Or do you mean how do you display the priority of incoming mail? You can display priority of incoming messages by enabling the "Flag" column in your message list viewer pane. In the Mail's menubar, go to Mail > View > Columns and select Flags. You can drag that column to the desired position (mine is 2nd from left) and adjust its width in the column title row using your mouse. If you have placed the Flag icon in the toolbar of the main mail viewer window, then when you click on the icon, you can locally "flag" it (displays a little red flag in that column next to the message) to remind you that you have to do something with/about this message. To add the Flag button to your toolbar, in Mail's menubar, click on Mail > View > Customize Toolbar and drag the Flag icon into your toolbar.
    The best way I would know to create an out-of-office reply would be to create a temporary rule that says "if account is 'whatever' then reply" and enter text in the reply text window. Problem is, I don't know whether the rule would be executed until after the message was downloaded in your running mail application, or until the message was actually viewed. You'd have to experiment. If your computer is going to be shutdown or you will be logged out, that won't work, and you'd really need to be able to do something at the mail server level, not your mail client level.
    (if you find that this solves your problem, or is actually helpful towards arriving at a solution to your problem, please consider clicking on either the "helpful" or "solved" buttons in the header of this post)

  • Timing with while loop

    Hello,
    How can I do a time with while loop?. I want to read a data in the While- Loop for 1 sec and then go to B .. I added a pic,
    Attachments:
    while- loop.GIF ‏6 KB

    nichts wrote:
    Hello,
    How can I do a time with while loop?. I want to read a data in the While- Loop for 1 sec and then go to B .. I added a pic,
    I would use as GerdW has mentioned,"elapsed time.vi" in a statement 1st case structure, after set time has elapsed> goto 2nd case structure. try not to use flat sequences....this can be done with case statements with transitional coding. I have noticed young LV programmers like to use flat sequences...I think it's a trap set up by LV developers? 

  • Using while loops instead of for loops in arrays?

    I am new to java and doing a java tutorial on using arrays and for loops. What im trying to find out is how it is possible to use a while loop instead.
    I would be very grateful if anyone can suggest a way of changing my code to use a while loop.
    The code I have written is:
    public class DetermineGrade
    public static void main(String[]args)
    final char[] mark = {'A','B' ,'C' ,'D' ,'F' };
    char [] grade = new char[5];
    int [] Score ={95,35,65,75};
    for (int i=0; i<4; i++)
    if (Score >= 90)
    grade= mark[0] ;
    else if (Score >=80)
    grade = mark[1] ;
    else if (Score >=70)
    grade = mark[2] ;
    else if (Score >=60)
    grade = mark[3];
    else grade = mark[4];
    for (int i=0; i<4; i++)
    System.out.println("grade = " + Score + ", " + grade);
    Thankyou LB

    Im trying to underdstand the differences in the
    different loops. I can grasp the for loop but I dont
    see how a while loop works, or how it id different
    from the other?
    for (j = INIT; j < MAX; j++) {
        // do stuff
    }is the same as
    j = INIT;
    while (j < MAX) {
        // do stuff
        j++;
    }Lee

  • Capturing of time taken by a while loop in bpm

    Hi ,
    I have a busniess process ,and my receive step is defined in a while loop.
    so it starts with a while loop.
    I want to keep a condition on the while loop that it should receive the messages only for a period of 1 hour ,and if it exceeds this period it should end up the process triggeringa mail.
    I mean to say if there are 12 records to be processed through the while loop ...and if I receive only 11 records ..it will be waiting for that final record in an infinite loop ..so I dont want that ...instead if the total no of records are reached then it should move forward ..If it is waiting for the missing records for an hour ..I should stop the process and trigger a mail to the queue monitor saying that record is missing...I have finished the process without this processing time condition successfully..
    I am new to XI and I dont have any idea on how to capture this processing time of while loop.
    can some one please help me out in this issue...
    Thank you in advance...

    Hi Latika,
    Yeah I understand we can go with fork but why I am going with this is ,I have already designed a Payload dependent loop ,by using while loop.so it makes my job simple ...
    Now I am converting it to time dependent loop,so only the final question I have is...In the time dependent loop documentation ..they have taken it as infinite loop and only kept the time limit in the deadline branch...so when the deadline reaches they trigger something.
    If you go to the documentation of time dependent loop(http://help.sap.com/saphelp_erp2005vp/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm) ..they took the infinite loop...in this loop if I mention the counter ..and if this record count triggers before the time limit...it should come out of the block...would it work this way ?
    Thanks a lot...

  • While Loop Help...I think

    All,
    I have a fairly simple VI that grabs the units of measure (send a "A") from a MARK-10 test stand and MARK-10 force gauge. I'm struggling with how, or where, I should place my While Loop. What I would like the VI to do is if the units of measure are not correct, change the units (send a "U") and retry the comparison.
    Thanks in advance.
    Solved!
    Go to Solution.
    Attachments:
    Untitled 1.vi ‏12 KB

    That looks like it would do what you want it to do. I have two observations that may improve your design.
    1. Is it guaranteed that the unit will be two bytes long at the beginning at index 7? I would recommend using the match pattern vi and if the substring is not found the offset past match will be -1.
    2. The close port probably should be outside of the loop and shift registers are good too unless you want to loose any previous error details.
    -Nate

  • While Loop Coding

    I have code where I am using a "while" statement. As long as the User presses the number 1 on the keyboard, the program loops back to the start, which is perfect, that is what I want. If a User press the number 0 on the keyboard, the program should stop and ... this is the part of the "while loop" that I don't understand how to code. Below is the "While Loop" that I have, as well as the ending line.
    public static void main(String[] args)
    String another ="1";
    while (another.equals("1"))
    .....NOW WHAT?......AS YOU CAN SEE, MY LOOP IS INCOMPLETE. I DON'T KNOW HOW TO CODE THE 0 PORTION.
    ...at the bottom after the System.out.Prinln() I have the following line of code:
    another = Console.readString("To place another order press(1). Press 0 to quit? ");
    Of course, the number 1 works but the 0 doesn't.
    Help and thanks.

    >
    public static void main(String[] args)
    String another ="1";
    while (another.equals("1"))
    .....NOW WHAT?......AS YOU CAN SEE, MY LOOP IS
    INCOMPLETE. I DON'T KNOW HOW TO CODE THE 0 PORTION.
    ...at the bottom after the System.out.Prinln() I have
    the following line of code:
    another = Console.readString("To place another order
    press(1). Press 0 to quit? ");
    Of course, the number 1 works but the 0 doesn't.
    You're right in principal. You don't have to do anything about checking 0, though it might be a good idea. So I reckon there's a syntax problem with the bit we're not seeing.
    If while controls more than one statement they have to be enclosed in curly brackets if you miss this it'll loop on the next statement only which, since it doesn't change your another will run forever.
    Incidentally a loop that runs at least once is better coded using the do .. while construct.
    I'd code it something like:
    String keepGoing = null;
    do {
       .... do your thing
       for(;;) {   // this is a "middle exit" loop
                // without the break it would run forever
          keepGoing = Console.readString("More to do? (Entery 0 or 1):").trim();  // trim removes spaces
          if(keepGoing.equals("0") || keepGoing.equals("1"))
               break;  // exit inner loop if valid
          keepGoing = Consile.readString("Eh?? Must be 0 or 1:");
       // now we know we have "0" or "1"
       } while(keepGoing.equals("1"));

  • How do I set while loop priority in an RT Field Point application?

    I have a vi that I want to run in an FP2010 that contains 2 while loops, one must be Time Critical priority and the other Normal or lower priority.  I will be using RT FIFO to transfer data between the two loops. The Normal loop will be used for communication with a Host PC.
    How can I set the priorities of these 2 loops?
    Can I run 2 separate vi's in the FP with each set to a different priority And transfer data between the two with RT FIFO? How?
    I am using V6.1 and the customer does not want to spend on upgrading.
    Thanks,
    Chris

    Chris,
    You are on the right track using two separate VIs with different priorities and using RT FIFOs to communicate between the two.  Please see the following tutorial and the related links, one link of which is an example with a zip file containing the RT FIFO VIs for LabVIEW 6.1.
    Doug M
    Applications Engineer
    National Instruments
    For those unfamiliar with NBC's The Office, my icon is NOT a picture of me

Maybe you are looking for

  • Windows XP Conversion Kit

    Hi all I have a new T61 with Windows Vista Ultimate. I would like to downgrade to Windows XP. I got three CD's with the Notebook 1. Rescue and Recovery CD P/N 43R4481 2. Product Recovery CD for T61 .. P/N 44Y4003 3. Supplemental Product Recovery CD f

  • 10.5.3 - USB Devices become unstable :(

    Since upgrading to 10.5.3, two of my USB devices (a thumb drive and a RALink chipset-based USB wireless key - as I need to plug it into an external antenna) have become flakey. This problem doesn't occur in 10.5 or 10.5.2, I downgraded on both machin

  • IPad connection to iMac

    I recently purchased an iPad and successfully connected it to my iMac webserver page. Now, 9 days later, there is no connection available to my iMac webserver page from anywhere on the web (apart from my own browser, through 'local'), even though App

  • XAML: Can we define style for nested elements?

    Can we define a style that will target "all TextBlock elements inside Border elements of style XXX"? I have a style <Style TargetType="Border" x:Key="XXX"> and I want all TextBlocks inside Borders with style XXX to have red Foreground. In CSS it woul

  • Upgrade to Elements 12

    I currently use Elements 10. Will Elements 12 overwrite the earlier version once I download it from the website?