make a block diagram: sequential table worth staying

Hello

I'm doing a block diagram for sequential same length of sequential inputs outputs.

It seems easy to do before I was in fact table of wiring, but I stuck.

So what I want to do is the following.

For example, a sequential input value will in say'u 5,4,3,2,1,2,3,4,3,2...

I want to get the value of sequential output as 5,4,3,2,2,2,2,2...

Basically, when the input value hits 2 once during the sequential, exit entry must remain 2 whatever values going in later.

Can someone help me?

Thank you

K

Hello
I world recommend that you use a loop with automatic indexing. If the value is 2, store Boolean information in a shift register and provide 2 at the exit of the Tunnel Index Auto if the registry value is true. This should solve the problem.

Tyler

Tags: NI Software

Similar Questions

  • Outline of the block diagram flashing red

    Hello. I don't have access to the Vi in question at the moment so I'll make it as General as possible. My Vi worked properly for a week or two, but today it started to flash red around the edge of the block diagram. Once the Vi makes the block diagram whole black for a while, followed by the red square around him. What is this red box? They are still able to run the Vi, it's why I can't stop their however, it is not a display of alarm or anything like that. I tried to watch as they run, but am getting no where fast. I just want to know what means the flashing red box does not pinpoint the problem. Thank you

    This means that your chart has been set to a big "breakpoint." Go to View > breakpoint Manager and delete the offending breakpoint.

    If you hold down the CTRL key while running a VI, LabVIEW adds a breakpoint at what you click on, so just be careful with that. I accidentally added breakpoints to my code more than once.

  • How do I block diagram page where a free label is visible/active?

    Hello

    I'm looking to be able to select a certain free tag and make the block diagram page where it is visible/active? I want to be able to screenshot of the diagram where the free label programmatically. Is this possible?

    Rgds,

    SMcS12

    A simple property node GObj (object highkight) does the trick. I used script where there is no option to highlight the particular frame.

  • Clean using SubVIs block diagram

    Hi guys and welcome to my first post!

    I m a bit new to labview, so be a little patient, if I do not understand everything immediately

    Im working on an existing program that is used to control an MCU on BabyLin on my front, although I have a visualization to see live changes to the system. The program works very well so far, but I m trying to clean up the block diagram. This should be done by subvis, right? I ve read a lot about the size of the block diagram should not increase my screen. Well, im at a length of about 3 x 2 screens (24 "!) after trying to use subvis and to shorten the distances between structures. The only things remaining are huge amounts of local variables and references (they existed already before I got to know the program), mainly for viewing. If I create a Subvi part containing the people of the country, it will change the references that does not make the program more readable (and small), and I guess I can't put a new Subvi on references + Subvi.

    You have any ideas what to do? I hope that I forgot something, otherwise, do not hesitate to ask.

    Kind regards

    Leo

    Bob_Schor wrote:

    To get a handle on the structure of your high-level code, write down (as if you were telling your boss or tell your wife - who knows, they might be the same person!) that you are trying to do.  Keep it pretty General.  You specified a number of steps?  So maybe the top level should be a State Machine, or a message in queue manager.  Describe you something that works at a constant speed, generating data that you have to manage "on the fly"?  Maybe it's a design of producer/consumer.

    You have a lot of initialization?  Put in a Subvi, bring the 20 son out in a bundle (it's "Boss-word" for a Cluster).  Your main program must have a few loops, with values that persist (possibly changing) during the program running in Shift Registers near the top of the loop, with tables and Clusters used to keep related items "consolidated".

    Not too bothered by the size of your routine - I recently downloaded a monster 50-monitor the Forums (I did not even try to understand), up to 6 monitors is nothing!

    Let "encapsulate the function" and "hide details" to be your guide in the reflection on the creation of the screws.

    Bob Schor

    To develop on the analogy of Bob, each talking point can be a Subvi.  In other words, code group associate subVIs.  The advantage of this is that it is much easier to solve problems because all errors will be localized to a Subvi.  Errors no longer Chase around the block diagram.  I guess you can use your current VI as an example of what NOT to do on the block diagram.

  • What this block diagram?

    What this block diagram?

    Match a VI Modbus Library. But I have because if the block is configured to write multiple coils in the coils because reading is set to 1?

    All this work?

    Sorry if the question is a beginner.

    In this block diagram, 'Coils Read' and 'Write multiple coils' are enumerated values (or possibly ringtones of appeal, which is not serious for the purpose of this explanation). Enumerations assign names to numbers, to make them easier to read. The coils Read command is set to 1, the command to write multiple coils has a value of 15. You don't need to worry about this number, however, because the enumeration takes care of it for you.

    The constant cluster containing coils of reading is there just to provide the correct data type (a cluster with the right items). Almost all the elements of the latter shall be replaced by the values of wired in the Bundle to node Name. For example, the value of reading coils is there as a placeholder for any function Code. the actual Code of the function is defined by plugging write multiple coils in Bundle by name.

  • Index Array icons: Palette and divergence of block diagram

    Hi all

    Why are the Index Array icons discrepants?

    There is a small difference between the two of them...

    ... That's how you see when you look at the table Palette...

    ... But this is how it appears when it is placed in the block diagram.

    Compare yourself:

    Is there a reason for this? I don't really know. I also looked for a thread about this, but I have found no.

    Have you ever noticed this?

    BTW, I'm using LabVIEW 2012 SP1.

    Best regards

    Hi João,.

    so to summarize:

    -l' icon changes when wiring to a 2D array entry rather than a 1 d of entry table

    -l' icon changes too much wiring when a 2D array input and, in addition, all the wiring index entries

    -l' also shows context help leaves how to index more than one element of an array

    -the range (maybe) shows an old version of the icon

    There is more than a simple icon fixed to IndexArray function, but that only one version is displayed. You will notice this behavior for many more functions...

  • Deleting the definition of Type casuses control a lot of misreferences and program in the block diagram errors

    In LabVIEW 2010, I have a Def Type control i.e. a Cluster with several other controls within the Cluster. Apparently, the references to the controls in the block diagram are based on the order that the controls have been added to the Type definition command. The side effect of this is that if a control is removed from the command of Type definition, many of the done Variable reference in the block diagram or now either broken, or worse still, refer to wrong control in the Type definition. These problems are quite difficult to find and fix.

    Comment: If you create a control of Type definition and make a Cluster. Now add any controls to the Cluster in an order, let's say A, B, C, D. Their types does not matter. Now use the Type definition in one or more controls on the front panel. In the block mark references to controls inside the Type Def would control on FP. Now return to the Type definition and remove the command B of the definition of Type. Now, lots of errors appear. Broken links. But worse still, you see old references to B that now refer to C and old references to C are now referring to the old references to D and D are removed altogether, etc..  This side effect is much more errors, broken links and misreferences than expected otherwise.

    How add and remove controls anywhere in a Cluster in a Type definition, at will, without creating a whole bunch of errors in program, broken links and misreferences for controls in the Type definition that have not changed?


  • HOWTO call "n" independent instances of 'Decimate (continuous) .vi"without putting instances of"n"of the VI on the block diagram?

    I have a double 2D chart I want to decimate continuously using the ".vi (continuous) Decimate" located in the range of Signal Processing. This VI is set on reentrant preallouee clone because it uses a FGV to save the State of the call to.  What I could do, but do not want to, is having a huge index table and wire 20 + 1 table of DBL to 20 + unique VI instances decimate to ensure that each have their own data space and no 'cross-talk' doesn't happen, then 'picture of generation' all back after the fact.

    I'm almost certain, there is a much cleaner way to do it with only one instance of unique block diagram of the VI decimate using techniques of the call by reference.   I found my way to this link: Preallocated-Reentrant-VI-within-Parallelized-For-Loop that talks about something similar.  After reading pages of four and the detailed help about the function 'Open VI référence' my head is spinning again on what option I want to spend (0x08 or 0x40 + 0x100) to ensure that whenever a slna 2D table come in, each of them is decimated by using the same clone that was used the last time it was called.

    Although the DBL entry 2D array always has the same number of lines, now, it is not always in the future this number and ideal would not force me to create several references strictly typed in VI decimate that will have to change as grows the number of rows in the table 2D static DBL.

    Anyone ready to set up an example VI that takes an array 2D arbitrary of DBL as input, decimating each line using the same clone independent of the "Decimate (continuous) .vi" and outputs the newly decimated 2D Array of LDM?  Assume that each line uses the same factor of decimation and 'Sprawl' set to False.

    Necessity is the mother of all invention and since it upsets me when I read a post that has a similar problem with no resolution, I felt compelled to post mine here.   I'm sure it's better I can do within the current state of LabVIEW.   The only question I have is what happens if I put the call by reference for loop be parallelizable?  That trash completely the nature of 1 to 1 of what I intended?

  • What is the best way to keep the block diagram / cleaning of façade?

    Hello

    I'm relatively new to Labview so I'm not able to say if I'm overloading my programs or make my too crowded block diagram. I was wondering if there was some ways to tell if I can simplify my programming just by looking (perhaps only experience contributes to these things)?

    I enclose my VI here. Currently, she is able to monitor the voltage and current of two engines. On the screen, you can see an indicator with the voltage and current values and there are cards that can display signals of different engines with a menu drop-down.

    The façade is pretty clean, in my opinion of novice, but the block schema seems messy to me, just at the first glance. I foresee a problem occurring in the future however. In the future, I will have the VI to monitor 50 engines globally. All of the programming will be the same as the one I have now, but it will have 50 indicators and unfortunately 50 times just about everything. I would like to avoid this, but I don't know how I did.

    I use a USB-6009. I use its four differential inputs to monitor the voltage and current of the two engines. In the future, I will get more units DAQ (25 in total because 2 motors can be monitored for each data acquisition). The new Renault will help will help with more resource space, but I think things complicate with the added option of 24 more Assistants of data acquisition (as used in my code).

    Thanks for any help you might be able to provide!

    Usually, it is above all the experience that will teach you the best methods for making your code to do pretty. I don't know anyone who is proud of his first application of claws. There are some resources out there to help with best practices, as that group on ni.com, but you will learn most of your own development.

    Your façade is superb. FPs in general really are to you. You can do it as ugly or pretty as you want. When you have a few controls in duplicate and the Group of indicators, you should use clusters and berries to simplify. You can use a bit of cleanup in this regard, but not much. In addition, I personally hate read red text unless it is a warning any.

    Your block diagram could use a little cleaning in a sense of modularity. You have a lot of repeated code, which you might consolidate in to a Subvi, which is used in multiple locations, or in a loop For. A general rule is to keep your block diagram within a single monitor. You should not scroll. Your application is quite simple, so it is difficult to BUMBLE

    Here are a few details on your block diagram:

    • Click with the right button on your devices on the block diagram and uncheck the "display as icon". You are welcome.
    • Operations on each waveform "(x*2-4)" / 16 in double ": create a Subvi and/or run the waveforms through a loop."
    • You do a lot of 2-element arrays and then indexing. Just replace the ones that have a Select node based on digital.
    • All your code runs every time, including the knots of your property at the bottom, which is not necessary. As you learn LabVIEW architectures, you will learn how to get around this with the initialization and the output of code, but for now, you should put a case around those structure for only when the engine numbers change.
    • I don't know how you're timing your main loop, but you should put a delay in there because you don't need the DAQmx node shoot as fast as your CPU will allow.

    There are videos of intro free that you can watch to learn what OR think in terms of coding and teach you some of the basic features and such. Here's a three-hour course, and here's a six-hour course.

  • Third-party tool to draw the rectangle on the block diagram

    I know he was once a third party tool that allowed me to draw a rectangle of Nice double border on the block diagram.  Yes, it's the not the front panel block diagram.  It was very useful to make annotations and designating functional groups.  Does anyone know what this could be?  I installed Package VI Manager and went through everything I can think of without finding her.

    Unfortunately, the documentation for those modules potentially very useful is poor.  The 'Get info' is terse point of unnecessary and by clicking on "Product Home Page" rarely gets you more than a logo, not informative.  Surely there should be more details somewhere.

    I don't know what you're referring to the tool. What is this logo? Maybe someone can recognize.

    What is the problem with the flat frame?

  • VI of script to read comments of block diagram

    Hi people,

    I have a small project to attempt to harvest comments in the block diagram, perhaps the help of scripts of VI. So, for example, when I'm checking #ToDo comments, I can get a list of the VI appearing in the #tag and collect the text. I think I found the method to get the comment, but I don't know how to recover the text in the comment. Here is a picture of how to get to observation in the block diagram (just using this as one small example VI)

    Thanks for your help!

    Rik

    James.Morris wrote:

    Here's what you want. It is worth noting that the current code only outputs the comment outside the structure of the case because you will need to dive into the structure for what anyone inside.

    Yes this will cross all GObjects, but I'm sure there's a bookmark API Manager that will return comments bookmark if this is what you are looking for.

    EDIT: Okay, there's an invoke node returns info bookmark on a VI but the VI reference may not be running.

  • a lot of Group of variables together on block diagram

    I was wondering if anyone knew a good way to organize a ton of variables on the block diagram? For example, I have 32 switches in this program and whenever I need to read or write from them that I have to use half of my screen just to install in.  I can't think of a way to make it work using bundles or subvis.  I have attached a picture of how I do things now, but advice on you guys how it would be greatly appreciated! Thank you

    Assuming that you do not use indicators and controls in the space of the façade, you can put a cluster around the controls on the Panel (would be helpful if you included a picture of the FP).  That's what I did, but I still need more controls half a dozen in the same group.

    Kind regards

    Michael Tracy

    Synergy microwave

  • exec Subvi system. Cannot access the positioning block diagram

    OK I'm back!

    My first question is that for some reason any I can reach is no longer here the files for you all to see...

    Second and more to the point, how can I know the exec.vi for open system where I want it too when the block schema access is password protected and I can't seem to make the nodes property for the vi either.

    I use this vi to call the OSK (on screen keyboard) for touchscreen.

    I have an example to show, but see number one...

    It seems to me that you want to position the osk and that means access to the block diagram is irrelevant.

    To position the program that you are a beginner, try this.

  • LabVIEW move things on different computers block diagram

    We have a site here license to my work, and I use several computers to develop and deploy our test code. However, I discovered that between computers, often things move on the block diagram simply by opening them on different computers. Mainly text fields. We have some text fields next to rows of a table of block diagram that are alliged with the lines of table on a single computer, while the same without code change when opened on another PC, all text fields are compressed vertically so that they no longer align with the rows of the table. This could be the cause, and is it possible to fix it?

    Thanks for the replies. It is the size of the police which was the issue. However, although I have tried to change the default Application font size (by the "default font" settings of "modification of the characteristics of text") to match the computers that had "correctly" it was not solved the problem. I finally realized that I had to change the police system from the Options > environment > fonts > menu fonts application of the front screen of "Open/create", then completely restart LabVIEW. Problem solved.

  • area limit of block diagram to clean.

    Hello

    I would like to clean my block diagram, but I want to make the most possible condenced into space. Is it possible to insert inside a rectangle that adapt to the window of the screen and clean it without enlarging the rectangle.

    See you soon,.

    Zied

    Hey,.

    I don't know I 100% understand your question. In the future, it would be preferable to this post on the forum of LabVIEW, since it is a question of LabVIEW and not specificially on the switches.

    You can use the cleaning tool block diagram on a specific part of your drawing and pressing Ctrl + U.

Maybe you are looking for