Problems about shift register

i am using shift register to detect the change of state of my system. --- to detect when the temperature exist the limit, say 50 degree
therefore, i want to set a constraint that when the past value is below the limit, and the present value is over the limit, the loop is runned and value, time is recoreded.
My problem is that the system can't run well.
here is my sample program
Attachments:
shift_regiter.vi ‏225 KB

Hi,
Yes I did see your eaxample.
Your inner loop will only ever get one reading if it is inside your limits because it will never exit and therefore your outer loop will never take another reading. Your limit checking needs to be in a parallel loop for it to have a chance to work.
Regards
Ray Farmer
Regards
Ray Farmer

Similar Messages

  • Questions about shift register

    hello!When I use the shift register,A problem occur!what I want to use is the serial in shift register function,But found only use parallel shift register,someone can give me any suggestions?(The best way has an example of a serial shift register),thanks!!!
    Solved!
    Go to Solution.

    I want to achieve :Each element of the array in the shift register Compare with 5,If less than 5, the output is 1, otherwise 0;but as you can see the vi is wrong ;Error reason is because of the shift register only for computing the entire array but not Single element,any suggestion?
    Attachments:
    the vi.png ‏8 KB
    array.png ‏5 KB

  • Problem in using the shift Register

    I have a problem regarding shift register when i was using it in my application.
    During the runing of the application i found that sometime shift register not pass the value to the case structure. at that time result is not displayed.
    i have attached the application in which that problem occur and the process regarding the execution, how bug produce and how to check where the shift register stop. please find the attachment and reply on the same.
    Attachments:
    Shift Register Checking Application.zip ‏173 KB

    I'm sorry but I don't understand your program.  I only see one shift register in Result Display.vi.
    What I do see is a lot of odd constuctions of while loops that only run once in your Main.VI.  Also, a heavy reliance on global and local variables that I suspect are leading to race conditions.
    Have you tried using the debugging tools such as probes and highlight execution to see our your application is behaving?
    I'd also be concerned about how you have "Lock Front Panel Until Event Completes" in the cases of your event structure.  And those event call other subVI's that may take a while to run and rely on user interaction with the front panel.  I also don't understand why when I hit "OK", the subVI front panel remains open.  It just makes running your application that much more confusing.

  • Problem saving an array using a shift register

    In the attached VI I'm building a 1D array of strings, then trying to save it using a shift register. For some reason my data isn't being saved and I dont understand why.
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    Shift_Reg.vi ‏15 KB

    Try this...
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Shift_RegMOD.vi ‏10 KB

  • Uninitialize shift register

    Hallo,
    I would like to ask a question about the uninitialize shift register. I would like to use a uninitialize shift register in a subvi in order to pass data between subsequent calls of the subvi.
    The problem is that the data i would like to pass is a 2D array.
    The labview seems not to accept 2D array data type in uninitialized shift register.
    Can someone please help me?
    thank you.

    Hi achille,
    ok, but where is the problem, it shows only that the "insert into array" function don´t dictate the array size.
    Where do you need it?
    One solution is to insert a case structure inside the while loop. Insert your code into the true case and an array constant into the false case. Connect a true to your case structure and you have what you want. But remember use a boolean control or a shiftregister value! If you connect a constant, then labview know that this case will never be execute.
    Mike
    Message Edited by MikeS81 on 06-06-2008 01:01 PM
    Attachments:
    Unbenannt1.PNG ‏14 KB

  • Getting Back Values from Shift Register from Other Loop (FPGA)

    Referring to the picture above, both while loops are inside one while loop (not shown in picture). Problem is im trying to execute the numeric control once only and use the value from the second loop after that. I tried many ways and still have no idea how...could someone help? Thanks in advanced
    Solved!
    Go to Solution.

    augustg,
    You might try using a case structure to route the numeric control into that shift register only on the first iteration of the outer while loop and in all other cases route the output of the case second loops shift register back into the first. Kind of hard to put into words, but something like this:
    The case structure to the right that I added has one additional case "Default". In this case the value from the shift register of the outermost while loop is wired straight through. Hope this helps!
    Nick C | Staff LabVIEW Platform Product Support Engineer | National Instruments

  • Problem with [shift-f1]-[shift-f4] in xterm

    I have run into some problems with the function keys on an xterm. The shifted versions of F1-4 don't work as expected. I found this thread:
    https://bugs.launchpad.net/ubuntu/+sour … +bug/96676
    discussing what seems to be this issue, having to do with some change in the terminfo data for various flavours of xterm. It apparently applies to gnome-terminal too, but not to Konsole, since it uses TERM=linux and not vt220, as far as I understand it. I can confirm this on my part too.
    The discussion there is inconclusive, so I just wanted to know if (a) anyone else here experiences the same problem (specifically, I have mapped <S-f4> to :wq in vim, but in xterm, it doesn't work. Changing to <S-f5> does work), (b) if this is a gnome/ubuntu-problem or a problem with xterm itself or some other library, and (c) if someone here knows of a fix, either temporary or permanent. At present, S1-4 are useless...

    Personally, I prefer to use a single shift register and an array with two elements. Minimizes code clutter.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    problem with shift registerCA.vi ‏13 KB

  • How to program shift register to read only when a new user is detected from user?

    Hi,
    I'm currently developing a program for position control in labview. The program is quite simple, whereby user will input the distance that he wants the table to be in the labview program, and labview will send signal to move a motor that will turn a ball screw to move a table horizontally to the targetted position. The criteria is that the profile of the motor depends on the distance it needs to move, whether a two-phase (acceleration and deceleration) or three-phase (acceleration, constant velocity, deceleration) to reach the target position.
    The problem occurs when the user wants to enter a new position (second input) for the table, as the input by user is position the table needs to be but the input required to determine which profile the motor follows depends on the distance that the table will move to get to the targetted position. Therefore, I would need a function to store the input by user temporarily, and recall it only when a new input from user is detected. By this, I would be able to use the difference of the input (input [n+1] - input[n]) and feed it to determine which profile the motor follows and the input by user can be kept as the position he wants the table to travel to (to compare with encoder).
    I thought of using shift registers to do this, but I am not able to make it to perform the deduction ([n+1] - [n]) only when it detects a new input. When i try using shift register, it travels to the targetted position, and one it reaches it will travel back to the original position. For example, when a user input 90, it means the table needs to move to point 90. As the shift register is initialized to 0, it will move to point 90 (90-0 = 90) but upon reaching 90, the shift register sends a signal of 90 (90-90 = 0) and the table returns to it's initial position.
    Is there any way that I can delay the reading of shift register only when a new input is detected or is there another way for me to achieve what i want?
    I've tried searching the discussion forum and ni website but couldn't find similar problems. Thanks for your help in advance.
    Solved!
    Go to Solution.

    Hi,
    I've managed to get what I needed by using a shift register + event structure as suggested by Adnan. However, I face another problem after implementing SR+event. I've attached two files, first the original program and second the updated program using SR + event. (it's only the jpg file as I've forgotten to save the labview program, will upload the program by tomorrow.
    In the original program, I have an elapsed time that is able to run continuously when I run the program. In the updated program, my elapsed time don't seem to run continuously when I run the program (as shown by elapsed time indicator). I need the elapsed time to run continuously as a input to calculate my motor profile.
    I suppose this is caused by the introduction of the event structure, will adding a case structure to wrap the event structure solve the problem or is there another way to get pass this. Appreciate if someone could drop me a pointer or two.
    Thanks
    Attachments:
    Mar 16 - continuous elapsed time.png ‏12 KB
    Mar 16 - elapsed time not continuous after introducing shift register + event structure.png ‏17 KB

  • Error 1 Configuration VIs while Passing Refnum through Shift Register on Mac

    All,
    I am using LabVIEW 2013 SP1 with Mac OS X (Mavericks). I have a simple shift register VI that initializes a .ini file, reads/writes, and closes. I've done this plenty times on windows with no problem. I wrote a quick VI on Mac and I get Error 1. I can't figure out what the problem is. I am attaching my VI. Can somebody shed light on this issue please?
    Kudos always welcome for helpful posts
    Solved!
    Go to Solution.
    Attachments:
    Config File Utility.vi ‏17 KB

    rolfk wrote:
    Keeping the AE in memory is not enough! The Top Level VI in whose hierarchy the Open Config case is executed needs to stay active (eg. not going idle) for as long as you want the open configuration to stay valid. The underlying object where the configuration information is stored in is a queue and that is a refnum like any other refnum in LabVIEW. And all real refnums in LabVIEW (except optionally the VISA ones) will be closed as soon as the top level VI in whose hierarchy the refnum was created/opened goes idle (stops executing).
    Actually even with VISA, "User Data" is lost when the caller goes idle although, VISA will automatically re-open a session identical to the previous session for that alias. Just "User data" isn't preserved in the session history.  Ditto for DAQmx, last session information is externally stored and retrieved (The lookup is by string- so you can coerce a string to VISA Alias or DAQmx I/O container.) the "Session histoy sticks around as long as the VI is in memory.  A trick I learned with an  init all vi call in a TestStand sequence Pre-UUT loop and a model that unloaded the modules when complete.  (I recall I just opened the VI FP "Hidden" as a work around)
    Most NI-Drivers (NI-DMM, NI-Scope etc...) also have this external since really they all use "VISA" down deep (an oversimplification but a good rule of thumb)
    THE EXCEPTION: Software defined instruments.  These act like file refnums and become invalid when the top level vi goes idle. Its the FPGA refnum that dies the sudden death on the "Legacy" drivers. I have not played with "RFmx" and wouldn't mind learning what happens in there.
    And just too really turn it all on its head, There is an LabVIEW Configuration option to "Automatically Close VISA Sessions."  Check that box and the external VISA storage is tossed under the bus so all those sessions you stored on a USR go invalid as soon as the Top Level goes idle
    Some days that can really bug you
    Jeff

  • Problem with Shift + Z + é combination

    Hey guys
    I've decided to ask this here, since I've been searching for a solution for 2 days now.
    I'll admit, it's for a game I really enjoy playing, where I have to press 3 keys at the same time.
    The 3 keys are shift + z + é, but when I do shift + z, I can't press é or when I press shift + é, I can't press z.
    The strange thing is, it works with every other combination for letter + number.
    Could anyone help me? I've tried turning off all the keyboard combinations, but the bug still appeared, so that's not the problem.
    Thanks!
    Michael H

    Thanks for your answers.
    But I thought I'm indexing the array from the last loop-step (therefor the shift-register). The help says, insert into index resizes the array.
    And why has the output-array of the following vi a length of 6?
    The only thing I changed is the index-source.
    Attachments:
    bug-shiftregister2.vi ‏16 KB

  • Problem viewing locally registered portlets

    Hi,
    Over the last few days, we have ben facing problems accesing locally registered Providers.
    On trying to view a portlet, Internal Server Error 500 pops up on each portlet.
    The application log is as:
    06/11/01 07:02:39 portal: id=86473141267,1 Invalid status code encountered : status=500 reason=Internal Server Error name=content-fetcher160
    label=webPortlet url=http://IP:PORT/<APP_CONTEXT>/providers/<NAME_PROVIDER>
    time=1054ms content=<HTML><HEAD><TITLE>500 Internal
    Server Error</TITLE></HEAD><BODY><H1>500 Internal Server Error</H1><PRE>java.lang.IllegalStateException: IOException: Read timed out<br> at
    com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.EvermindHttpServletRequest.getParameter(EvermindHttpServletRequest.java:2452)<br> at
    oracle.webdb.provider.v2.utils.http.ProviderRequestWrapper.getParameter(Unknown Source)<br> at oracle.webdb.provider.v2.adapter.SOAPServlet.service(Unknown
    Source)<br> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)<br> at com.evermind[Oracle Application Server Containers
      for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)<br> at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown
    Source)<br> at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)<br> at
    com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)<br> at
    com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)<br> at
    com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)<br> at
    com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)<br> at
    com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)<br> at
    java.lang.Thread.run(Thread.java:534)<br></PRE></BODY></HTML>
    Tried setting the log level to 7 in the web.xml in my local provider, but the error log remains as it is.
    Any idea what could be causing this.
    Regards,
    Mukta

    It appears to be a problem on only one computer. Works fine on my other Mac.
    So there must be something different about either this Mac, or this account. Arrg.

  • Any way to save data in loop without using shift register or feedback loop

    Hello all
    I was thinking, is it possible to save data in a loop to next iteration without the use of a shift register or a feedback loop?
    I need the possibility to reload data within a loop from a lvm file, but I want to use the same data until i load some new ones.
    The reason why I don't want to use the shift register or feedback node is due to speed, even though I am not sure if the shift register
    actually moves all the data from one register to another, or if it is stationary until a change in the data occur.
    The data I want to reuse is medium-large (6 force measurements, 2 pressure, 1 flow channels)of about 10sec data in each file with samplingsrate of 2kHz..
    In my analysis program I have many CPU demanding calculations and 3D graphs, so I just want to minimize the CPU load as much as I can for each part of the
    software..
    I have attached a small VI to explain what I am talking about.
    I now I shouldn't use the express VI, and I am going to change that as well - this is just a proof of concept! 
    Hope you guys can help me understand this shift register better...
    Thanks!
    - Tommy 
    Running LabVIEW 2009 32bit SP1 on Windows 7 64Bit
    Solved!
    Go to Solution.
    Attachments:
    visual.vi ‏34 KB

    tombech wrote:
    [...]The reason why I don't want to use the shift register or feedback node is due to speed[...]
     Tommy,
    shift register are the fastest you can ever get...........
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Shift Register while Indexing Arrays in Formula Node

    Hello, 
    I am having trouble using the formula node while indexing my two arrays.  I keep getting "NaN" for my output array. I believe the problem lies within my shift register.  My guess is that for the first calculation there is not a PreviousAngle so that is why it is giving me "NaN."  For the first index I would like the value of the PreviousAngle to be 0. I am new to LabView and unsure what to do.
    Thanks!
    Christian Seymour
    Solved!
    Go to Solution.
    Attachments:
    Complementary Filter.vi ‏21 KB

    The shift register should contain 0 by default since you are using a double [if uninitalized, the shfit register takes the default value of the data type.  In this case, the default Double is 0], but you should explicitly initalize the shift register to a default value in most cases.
    To do so, right click on the "previous angle" shift register and select "Create constant".  This will create a Double value of 0 to fill in the register for the first calculation.
    If you need a number other than 0 to start, you can just change this constant.
    **Note:  This is a good habit to have.  Shift registers retain value as long as the VI is in memory.  So if you run this more than once, it will have the value from the last execution automatically!  This is usually unintended behavior for new LabVIEW users -- however you can sometimes take advantage of this feature in some applications and make it intended behavior
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If someone helped you out, please select their post as the solution and/or give them Kudos!

  • Adding Shift Register to Stacked Case structure

    According the the Help, you can add Shift Registers to Structures.  The Stacked Sequence is a Structure, but I don't see the option to add a Shift Register when I right click on the left side of the Structure.  Am I missing something?  I want to run my Error In and Error Out lines through the Shift Registers in a Stacked Sequence so as not to have to do it using a Feedback Loop, as that would get messy.
    Solved!
    Go to Solution.

    Newenglandguy_LV wrote:
    NIquist wrote:
    I think what you want is the "Add Sequence Local" function which allows you to pass data from one frame to the next.  It's an ugly, confusing choice when you have much better options though. 
    It sounds to me like you just need to create some subVIs to better compartmentalize your code.
    I do understand your comment about compartmentalizing, but if I did that I'd have a VI for every few event sequences.  The only reason I'm putting them in a stacked sequence, is to allow whom every might want to understand the flow, not to have scroll across.  If I was working in a coding language, this would be a simple series of commands, in maybe 10 lines of code.  But that's where I'm struggling to see some of the advantages of LV.  I simply want to have errors flow forward, and send a series of commands to the same instrument with some delay in some cases.
    Perhaps it would be easier to help you understand if you posted the code you have so far. Are you using the sequence frame because you are using the Wait function, which has no error in/out terminals? If so, you can easily whip up a wrapper VI for that function.

  • Task out with a shift register using ULx

    This post below describes my same problem of passing a task through a case structure but they are using the DAQmx Library and it has a CreateTask.vi which the ULx Library doesn't have.
    http://forums.ni.com/t5/LabVIEW/passing-DAQmx-task-out-through-a-shift-register/td-p/410447
    Any suggestions as to how to get my task out through the shift register?
    Thanks
    -CC
    Solved!
    Go to Solution.

    I have never had a problem getting ULx task out of shift register.
    This is an action engine that I use to store the ULx tasks ref to use later in the code.
    Omar

Maybe you are looking for

  • "Library.itl file cannot be found or created"

    My iTunes 8.0 was working fine and then all of the sudden I get this message whenever I try to open iTunes. "The iTune Library.itl file cannot be found or created. The default location for this file is in the "iTunes" folder in the "Music" folder." T

  • 1 Apple ID / Acc, 2 iPhones how do i pick and choose what iCloud data shared?

    Hi, I have a MBA, iPad, and 2 iPhones all registerd to the same Apple Account & ID. I have 1 i-phone, the other is my wifes. We have them all sharing the same ID so that we can share / store itunes downloads without having to purchase them seperately

  • Can no longer edit app descriptor file with 3.4 - really?

    Until now, when publishing to AIR from Flash Professional, I could manually edit the app descriptor XML with a little workaround: 1. Set up my publish settings in Flash Professional and click OK 2. Then edit the XML file and save it 3. Then Publish f

  • I keep getting the alert window that says, "the url is not valid and cannot be loaded"

    My computer is "online" but whenever I try to get on a website, the "Alert" box pops up in the middle of my screen saying, "the URL is not valid and cannot be loaded". This is only happening on Mozilla Firefox, I am able to use Internet Explorer with

  • SubVI

    I am opening three subVI's in the subpanel in my main VI depending upon the menu chosen. Then, I need to enter a filename and some numeric values in one of the subVI, open that binary file and perform some operations with the data depending upon the