Reset the shift register according to value

Hey there ' All, I've been thrown in Labview to work, so I made a few minis and other programs on my own. The last one I wrote is a system of notification by e-mail, because it's something I plan use a lot. The idea is, I have a random number generator that collects a number every 100ms using a timed loop. When a number is greater than a certain threshold, say 0.5, an email is sent and a flag is hoisted. From there on, I don't want to send any other emails until the number is BELOW a certain level, say, 0.3. With what I wrote, I get emails to send no problem and I can't stop them sending (using a combination of Boolean indicator and a shift register), but I can't understand how to to reset the indicator to allow emails as soon as I "roll" a number under my lower threshold.

Is there a way I can achieve this? I would be deeply obliged for any help. I have attached the VI I did below, apologies, if it is messy and so on.

Use a Select statement after the structure of the case.  If the reset condition is True, then thread a real constant through the register shift.  If the reset condition is False, then just wire the existing through the register shift.

Tags: NI Software

Similar Questions

  • Change the shift register

    I hope someone can direct me on that. I'm stuck.

    The NTC, I want that it start at zero, enter the nested loop

    and when the case statement is equal to one, add 3000,

    so I have a lag on "undesirable" elements in the 1 d

    table I'm parsing...

    TIA!

    the nested loop shift register is not initialized, it is best to initialize it with a constant 0

    Then, the index entry Array subset function is connected after or before the function incriment? I can't decide...

    in any case, if it is connected before the incremint function then the nested loop iteration 1 will send a 0 at the entrance to the function of the subset of the Array index.

    EWW! , a lot of entries, words of functions in the above paragraph lol , can u get me here?

    now I can just understand the problem what exactly you're talking about. the sequence of events for your code will be like this:

    After the nested loop is complete, the output will be available (1 d the function add array element table) to the structure of the case where you want to add 3000 to the value of the shift register and start the loop nested with initialized again records with value = 3000? Am I wrong?

    If I'm right, you must reset the shift by using a control register, create a local variable to him and place it in the business structure then her manipulate it as shown below:

    Since the default data of "N" type digital command value is 0, then initially the shift registers will be initialized with 0 as the guy above

    Thank you

  • problem with the shift register

    for purposes of simplicity, I remove code without problems

    Description:
    1. my state machines, for some reason, a lot of cases.
    2. the order of each case may not change.
    3. the main prupose is to get the difference as on the front panel
    4. prior to entry difference, I first is measured in the case where 2 and TRY using shift register to pass data, ideally at least 5
    5. However, the "previous" value is updated too soon, unlike 'get' is always ZERO.

    for example
    You can see the shift register on the left side has two components, ideally, the 'get' difference should display 2-0 = 2.
    However, given that the second element of the registry team updates too early, my objective cannot reach and meet up with ALWAYS 0

    I think it's my misuse of the shift register for the computer to several cases.

    I pasted this problem for 4 hours... kind of stupid, but could not understand

    in a mulit-case state machine, how to properly passes data to the case (5 in this example) INSTRUCTION to ensure that I get the correct calculation

    GOLD: because I am only looking to the current value and the previous value, are there other ways to get this problem is?

    Thank you

    It is a case where execution highlighting can be helpful. Turn on execution highlighting by clicking the light bulb on the block diagram toolbar. Then, run the VI.  You will see the left side of the team to register the change as the state machine goes through States 3 and 4.  At the time where what happens to 5, all data in the change record is identical.

    One of them might be to use two registers to offset, one for the current value and the other for the previous value.

    Lynn

  • Increment of the counter without using the shift register

    Is there a way to count = count + 1, with using a node registry or feedback shift?  I have a structure of the event within a while loop (see table).  When the button is touched (kickoff event), a test is carried out.  Based on the test in the case of a string is passed outside of the event to a case statement of success/failure.  The user can run one of these 'events' as many times as he or she wishes.  And in an order any... Test1 (fails)... test 1 (fails)... again... test1 (go) again... test 2 (pass) then test 1 (pass).  When the stop button is reached, I would like to know how many times each pass/fail is produced for each test.  Try to stay away from shift registers, as I have 18 w key so a possible failure for each, so I would need 36 shift registers.

    In my example, the printed final statement would be:

    TEST PASS/fail # x test was performed

    test1 failure 1

    2 in case of failure test1

    Test1 pass 3

    Test2 pass 1

    4 passes test1

    etc.

    Do not see an attachment.

    You can use a shift register to store a table.

    Each button would be mapped to an array index. For each button pushed you the value of the index table, + 1, replace the array element and pass out back for the shift register.

  • How to program the shift register to play only when a new user is detected user?

    Hello

    I'm currently developing a program of position control in labview. The program is quite simple, in which case the user will enter the distance on which he wants the table in the labview program and labview will send the signal to move a motor that will turn a ball screw to move a table horizontally to the targeted position. The criterion is that the profile of the engine depends on the distance to move, if a biphase (acceleration and deceleration) or three phase (acceleration, steady speed, deceleration) to reach the position of the target.

    The problem occurs when the user wants to enter a new entry second position) for the table, as the input by the user is the position that the table should be, but the necessary input to determine what profile the engine follows depends on the distance that the table moves to the target position. Therefore, I need a function to save the entry by the user temporarily and reminds that when a new user input is detected. Hereby, I would be able to use the difference of the input (input [n + 1] [n] input) and animal feed to determine what profile the engine follows and the entry by the user can be kept in the position he wants to the table to get (to compare with encoder).

    I thought to use for shift registers do, but I am not able to perform the deduction ([n + 1] - [n]) only when it detects a new entry. When I try to use registry to offset, it moves to the target location, and we only reached it will go to the original position. For example, when a user entry 90, this means that the table must be moved to the point 90. The shift register is initialized to 0, it will move to the point 90 (90-0 = 90), but arriving at 90, the shift register sends a signal of 90 (90-90 = 0) and the table back to its original position.

    Is it possible that I can delay the reading of the shift register only when a new entry is detected or there at - it another way for me to achieve what I want?

    I tried searching the forum site and neither discussion but could not find similar problems. Thank you for your help in advance.

    As I understand it, the use of shift registers with a structure of the event (to detect a user event when the user enters a new value) should solve the problem. Do not forget to post your request (or a version of it that isolates the issue) when you arrive at the lab, if we can get a clear visual of the issue you are facing.

  • initialize the shift register

    Hello

    How to initialize the shift register (inside the second loop for) so that it starts from 0 whenever the program runs. I tried to attach a constant 0 in left shift register, but which resets the registry whenever it passes through the inner loop.

    Thank you

    If you only want to reset once at the beginning and not for each iteration of the loop for external, you must add another register to lag on the outer for loop and wire lag 0 to that registry.

  • replacement for the shift register chart

    Hi, I have a problem with my program. When I want to compare graphic legend with my present graphic it just overwirite with my graph.when this I add new data and then run my program it does not work. I tried to use shift regoster but my program eror. where should I put the register shift in my program? Thank you

    The shift register is on the outer loop. There is no need for inside while loops. The shift register should contain a table of two parcels of xy. Replace one of the accrding of two plots to the key using "replace the subset of the table".

    You don't need to a simple shift register, you have far too much code.

    (Please attach the screws with a suitable name. My Downloads folder already contains dozends of files "x.vi no title")

  • I want to reset the Prefetch function on its values.

    I use Windows Vista Ultimate SP2 32 bit and I want to reset the Prefetch function on its values.

    is there a way to reset/restore it? Windows will recreate it?

    If you delete the Prefetch folder or all files into it, WIndows will recreate.

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-is-the-prefetch-folder

  • Cancellation of registration user stored in the shift register event generates the error 1 if Subvi runs intermittently

    Hello

    I'm trying to understand the behavior of the attached excerpt from a larger overall vi functional.

    In a State, I'm generating a user event and in a State later unsubscribe from the event and destroy it.

    Now, if I went through the VI together in one step (i.e., step through events? set to FALSE), the VI runs without generating an error. However, if I run the VI by intermittent and output after each execution of the loop, the vi generates error 1. Why is it so? Please notify. Thank you.

    Peter

    Why are you registration and deregistration of events user, but you have no event structure in your VI who use them?

    When you run events, probaby the event you registered disappears when your VI stops running.  If you were able to keep your VI in the foreground running, then the life of the event would persist.

    The event number still exists in the uninitialized shift register, but it does not say more once your high level VI stops and you get the error 1.

    If it was really a global functional VI, you would terminals connected to the connector table in your VI, you would call this as a Subvi as part of a main VI and life event would persist and you wouldn't mistake 1.

  • Why do I only a part of the graph of the wave even if I added the whole wave using the shift register?

    It seems only to read 200 samples and then stop. Shouldn't get a chart to continuous wave after using the shift over a time register loop?

    You must remove VI begin to break out of the loop...
    You can not 'start' a task that is already running...

    You also remove the VI start completely from your code... If you do not use start VI, a measurement task starts automatically when executing the DAQmx reading VI.

    Find the attached VI.

  • How to reset the null to a type value?

    Hello

    Do I need advice to reset the value of a type or if I have to reset the null value for a type?

    I use the same variable for a query of SUPPRESSION of difference. If it is OK?

    Please advice-

    Thank you in advance.
    PROCEDURE pr_type_example
       IS
    
          TYPE my_type_1 IS TABLE OF table1.col_1%TYPE;
    
          v_type_one                 my_type_1;
    
    begin
    
    SELECT table1_id
          BULK COLLECT INTO v_type_one
            FROM table1
           WHERE dt_name = 'ABC';
    
          FORALL i IN my_type_1.FIRST .. my_type_1.LAST
             DELETE FROM table2
                   WHERE table2_id = my_type_1 (i);
    
    
    SELECT table1_id
          BULK COLLECT INTO v_type_one
            FROM table1
           WHERE dt_name = 'XYZ';
    
          FORALL i IN my_type_1.FIRST .. my_type_1.LAST
             DELETE FROM table3
                   WHERE table3_id = my_type_1 (i);
    
    ...
    ..
    
    end pr_type_example;

    COLLECTION in BULK automatically deletes data collection before you retrieve the data in the variable.

  • Add DAQmy Read data (analog 1-d NChan NSamp Wfm) to the shift register

    I have problems when you try to add Reading of DAQmy (analog 1 Wfm NChan NSamp d) data to the registry to offset inside the structure of cases the timeout event. DAQmy Read data 1 d table 3 waveforms (I use 3 channels). I tried with build table (also with additional and for loop, to generate the data for each channel separately), but without success. Suggestions, ideas?

    As I am having some problems attach file .vi, I posted a link where to get the files zip package:

    https://DL.dropboxusercontent.com/u/12580896/vibration_meas_V7.zip


  • Initial value shift register

    I wrote a simple program with a while loop that contains a shift register that record the value of the previous iteration.  When I stop the program and restart the program even once, I thougth the shift register value will reset to 0 (for a type of data I32)?  Apparenetly, the shift register keeps the value of the previous run until I stop the program.  Why is this?  Why change doesn't register reset?


  • How to make shift register init happens only once, so that the data can persist across multiple tracks of a loop?

    Here's the situation:

    We are repeatedly followed eight real-world signals and comparing them to a threshold value.  We do this via a loop For inside a While loop.  The loop For runs eight times per pass.  We have implemented a binary table 1 d and the use of the index of the loop For as the array index, by putting a Boolean result in the table using the function replace table subset.  We want to keep the data in the table to be 'sticky', in the sense that any True value is locked, so even if a fake comes later, this array element true.  However, since we initialize the array in order for the replacement to the work table, we see that whenever the loop For again, it resets the table and destroys the history.

    I have attached a simple VI to illustrate the concept, using a random number generator as a stand-in for the real world signals.  How we change this VI do and entered real lock through multiples for loop runs, indefinitely?

    In case it is not obvious, I am a relative beginner, so please keep count in your response.

    Thank you

    B

    scottbbb wrote:

    For B, although I love the simplicity of it, I have a question: it solves the problem of the re-initialization?  What the shift of the While loop register get initialized - only once during its launch?

    Yep, the shift register Initializes only at the beginning.  You could say that every time the while loop is called (not each iteration) the shift register is reset with the wrong table.

    And, Yes, GOLD will always keep a REAL when it is TRUE.

    Usually, the simplest solution is the best.

  • A shift register reset

    Hey guys, I'm trying to get the my VI to zero out / clear the values of registry update once I reached a certain goal without having to restart my VI. I go where after so many cycles (defined) have been ran, my default data button (off). I want to be able to support this key data to acquire more data if needed... but my problem is that the shift register is the previous account! If I can get my shift register to clear to 0, I think I can move on to the next phase of my program. Yes, it is for the love of vanitys, but nevertheless, wanted.

    You can use a state machine. You have two States: perhaps slowed down and running? I've attached an example.

    You can reset your meter when the condition is fulfilled (in the transition state) without stopping the program. I hope this helps.

Maybe you are looking for