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.

Tags: NI Software

Similar Questions

  • 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.

  • 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.

  • 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.

  • 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")

  • How suspend you a shift register?

    Hello

    I vi uses change registry to change a value in each iteration of the WHILE loop.  However, I do not want the value to be changed with each iteration.  There are some cases where I want the value in the registry at fixed offset to stay as other operations in the WHILE loop run during subsequent iterations of the WHILE, and then a little later, I want the value in the registry to shift to resume editing.

    For example, in the attached example code, a value of '2' is added at each iteration of the WHILE loop.  In addition, at each iteration the LOOPER value is multiplied by 10.  Suppose I want register offset to increment by 2 only if the ENTRY is greater than 1000, and the ENTRY is known to fluctuate above and below 1000.  When the Boolean INPUT value is TRUE, I want to register to offset to increment by 2, but, if it's FALSE, I want the other function in the while loop for execution, but I want the register shift to hold the last value and act on the last value when the Boolean value back to true.

    For example, if the Boolean value is true we'd see these values in the SPEEDS and the indicators LOOPER lever, respectively:

    2: 10

    4: 20

    6: 30

    8: 40... etc.

    If the Boolean value is true, false for 3 iterations and then returns true, I want TO see something like this...

    2: 10

    4: 20,

    6: 30

    8: 40

    50

    60

    70

    10, 80

    12, 90

    14, 100

    Is it possible to pause (and resume) the incrementing of the shift register, without interrupting the execution of other functions in the WHILE loop?  I tried with a structure of the case, but... couldn't find a way to put together it.

    Thank you

    Your most recent one was in LabVIEW 2013. Have you tried the suggestions on how to solve the original question?

  • 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

  • How to program the button to download a PDF file?

    I'll put up a new site of CVS in Flash CS5, and I created a button so people can click on the button to download a copy of my CV PDF, but how to program the key so it downloads the PDF file?

    It doesn't seem to be a problem in actionscript at all.  You place a file with this name on this web site/url... http://www.yahoo.com/LAudell_Resume.pdf.   Although I doubt that you have the kind of necessary traction with Yahoo in order to plant the files on their main url.

  • How to integrate an audio to a Muse image file so that the music plays only when you click on the image?

    Hello! I'm looking for a way to incorporate an audio file (mp3 or quicktime) into a still image in my Muse site. Ideally, the audio would play only when you click the image, so that each image can contain a separate audio file. So important is that the audio file is not visible on the site (so soundcloud, youtube and vimeo doesn't work here). Is there a way to do this? Thank you, AR

    Check out this edition of the month of 123Muse (www.123Muse.com). This is audio and video by Muse.

  • I want to know how to restore the computer to its factory settings, when I bought from a private party and have an administrators access code

    I want to know how to restore the computer to its factory settings, when I bought from a private party and have an administrators access code

    Hello

    What is the brand and model of the computer?

    The best method is to contact the computer manufacturer for help on how to set the computer to its factory settings.

    Hope this information helps.

  • How to configure the agent to monitor performance only the vcenter vmware and esx, not need to monitor virtual machines

    How to configure the agent to monitor performance only the vcenter vmware and esx, not need to monitor virtual machines

    This is not possible with the way in which we collect information.

  • How to upgrade the version of Adobe Flash Player on my new Samsung Smart TV

    How to upgrade the version of Adobe Flash Player on my new Samsung Smart TV?

    I just bought a Samsung Smart TV. When I try to watch ESPN3, I get the message: insufficient Flash drive requirements.

    Click to update provides the following information:

    Adobe Flash Player version 11.2.202.243.

    Your system: 32-bit Linux, Safari.

    NOTE: Adobe Flash Player 11.2 will be the last version of target Linux as a supported platform. Adobe will continue to provide backports of security Flash Player for Linux 11.2.

    Select Version to download:

    YUM for Linux (YUM)

    . for other Linux tar.gz

    for other Linux .rpm

    APT for UBUNTU 10.4.

    When I select the first 3 options of Linux, I get the message: IMPOSSIBLE TO DOWNLOAD.  When I select APT, I get the message SERVER NOT FOUND.

    Hello

    As I mentioned earlier in this thread (15,17 and 37 positions), doesn't matter which drive Flash updates for Smart TV, if any, would come from the manufacturer, Adobe and certainly not some random site asking you to fill out a questionnaire before give you a file.  Please contact your support of manufacturer of Smart TVs.

    Please, please, please, do NOT go to some random website that asks you to fill out a questionnaire to get a file.  If you happen to get a file, it will likely contain a virus, malware, etc..  Adobe, or any legitimate manufacture, will display a file on some random site and ask you to complete the questionnaire in order to obtain the file.  It just opens your system to all kinds of bad things.  Please do not.

    --

    Maria

  • 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.

  • How to get the PE9 DVD to play on the new blue ray players?

    I upgraded to PE9 because my PE2 dvd play on my new blue ray LG or Sony players.    Unfortunately, PE9 discs do not play or the other.   How to make the disks that are going to play?   It is a real disappointment, since my goal is to change the years of family videos and make a nice set of DVD pick up and watch it with the family.   I can't believe that people that I send to the family to go including our buy a DVD player (and some of them do not work either)...

    Help?   He is not much of interest to one program editing if you cannot produce a final result for video display!

    p.s. I'm happy to do all the work around that will work... burn a file on the disk and access through the data area of the BR player?    Use another program to take the exit PE9 conversion and make it playable on dvd s... anything that works is fair game.

    Thank you

    David

    David,

    DVDs created with pre will normally play on most players, if DVD or BD. However, no DVD, or BD player is certified to play ANY disc - DVD-video or BD. They are certified only to read discs replicated in trade. Some players are better at handling serious records, than others. This ARTICLE will give you more background and some suggestions to get the best possible disc.

    In a Word, two major considerations are the brand of blank media. What brand do you use?

    Then, and although it is less important than a few years ago, the media type may play a role. What type, - R, or + R, are you using?

    Burning speed can contribute to the quality of combustion, but forwards, we limit ourselves here. Pre will be a speed of blank media, the speed factor of the burner, and then choose the highest speed. Normally, it will be OK, but when things do not work, I recommend a different workflow:

    Burn the project to the file. This will create a VIDEO_TS folder, where you choose for the Destination, which will include the necessary IFO, BUP and VOB, files. At this point, I would like to use DVD software to test the game the VIDEO_TS folder. Then, we use a burning utility, as big, free ImgBurn to do the physical burn on the disc and choose the VIDEO_TS folder (with files). Here, you can adjust the burning speed. I recommend about 1/2 down the list of possible speeds. It takes more than a few minutes, but is often the secret to burning discs with high playability.

    I'd also look on from the mfgr of the multi-lecteur. Web site and then download and install the latest firmware for this model drive.

    Once finished, test the drive in the Multi-lecteur on the computer using the DVD playback software. If it works, then the disk is fine, but could not yet be seen by a set-top player, and this is where the first two steps we just get the best possible drive.

    Good luck

    Hunt

Maybe you are looking for