Urgent: remove a known pattern of an array of Boolean

Hi, I have a Boolean data chunk and I would like to browse the model following '111000' all the data and remove this pattern repeated data. I would be very happy if you could show me how do it in LabVIEW. An example of code would be great. Also is there any wany to keep the index of 1 first of this model

for example 0101100110 (1110000), 1011001100101 (111000) 011001 to 01011001101011001100101011001

Thank you very much

tolerance zero says:

My apologies. I did not read carefully enough .

See the attachment again.

Your code seems to be limited to Boolean 64, which I don't consider a 'big piece' as described in the original problem.

Here's what I'd do. Modify if needed. (Of couse, it is possible that after the replacement of the model, new matches to the model are possible, then you will need to make several passes before you have not performed any replacement more).

Tags: NI Software

Similar Questions

  • Use an array of Boolean to jump to sections of code (extensible design).

    I currently have four pieces of code (which could turn into 5, 6 or more pieces in the coming months), I want to run or jump selectively according to an array of Boolean.  I have a cluster typedef of numbers, which are each refers to a port VISA number connected to a particular instrument.  This will be expanded in the future as the software is necessary to control the instruments more.  There is an array of Boolean (coming from the vi) attached which has a value of TRUE for each instrument that was detected (and therefore is connected).  In the case below, I want to initialize each instrument that is connected, but not try to do something for those who are not.

    The cluster and the Boolean chart is shown below:

    As someone who will need to expand in the future on this section of code, I want to write it in a way that will be infinitely extensible, without taking more space BD.  At the moment I find myself unable to do since I do not know how to pair the table of Boolean with the elements of the bunch, such that I can run or ignore the code accordingly.

    Help, please!

    -James

    Since you mention that you want to expand, I'd be more inclined to set a dashboard containing the port number, the type of instrument and the status of the instrument. When you search for your instruments you want to iterate over the array. You can use an ini file to determine which instruments must be present in the system. Others may be optional, and their associated actions could be ignored if necessary. However, the main point I'm trying to do is to combine your status with your instrument information table. This way, you eliminate the possibility of a mistake trying to keep and table and a synchronized cluster. A table makes it also much easier add or remove instruments from your system.

    A few other notes, if you check in a stop condition then stop. Don't simply continue the execution of each iteration of the loop with a business structure that will jump execution if the stop consifition is encountered. Simply stop. Imagine if you had 1000 items in your instrument cluster/table. Using your method always run you your loop 1000 times, even if the shutdown occurred during the first iteration. Eliminate duplication of code and logic twisted to combat it. You have two places incentive th euser, if they want to start or stop. You must have a place to make this code. Much easier to understand and maintain. Don't expand your code easily either because the hard-coded error strings. Your case statement will become very large if you generate your static error strings. Use a loop and a format common you build your missing channel of the instrument. If you use the table on the groups of instruments, I suggested that you will be able to format the string using the type of instrument. I'd be much more inclined to use a single notification utility that will be supported as well cancel and stop messages. It changes a lot better when you have additional message types rather than use a notification for each type of message.

  • Create an array of Boolean 1 d of reference Boolean table 1 d

    Hello

    Any suggestions on how to create an array of Boolean 1 d of reference Boolean table 1 d?

    Thank you for any ideas?

    You can wire the reference to a node value property and get the array of Boolean.

  • Create table 2d by pulling larger 2d table columns, as indivated by an array of Boolean

    Hello

    I have a 2d chart with 16 columns that contain data from different input channels.  I also have a 1 d array of Boolean (length 16) corresponding to these columns.  In the table of Boolean 1 d, if a value is true, I want this column in table 2d to stay.  If the value in the table of Boolean 1 d is wrong, I want to delete the corresponding column.

    Thus, for example, if the table of Boolean 1 d looks like this:

    [T T T T F F T T T F T T F F T F]

    the new 2d array would be 10 columns, which correspond to the columns of the old 16-column of table 1, 2, 3, 4, 7, 8, 9, 11, 12 and 15.

    I am very new to labview (programming just started yesterday). Can someone help a newbie to do something that is probably simple? In my view, that there will be an iteration back through the deletion of rows and 16 columns table columns as they come if the value of the Boolean vector is false, or iterate forward through the 16 columns and add columns to a table if the value of the Boolean vector is true... but I don't know how to do this.

    Thank you

    Matt

    If you have 2012 you could just do this:

    -Ryan S.

  • How to select cases or an event using an array of Boolean 2D.

    Hello world

    I'm trying to use an array of Boolean 2D to select different events or case. For example, if the variable Boolean 1 and 2 are TRUE, case 1 will be selected. If the Boolean variable 1 is FALSE and 2 is true, case 2 will be selected and so on. I tried to use the Boolean to the number, but I need a way to differentiate between B1 = B2 = FALSE and B1 = B2 = TRUE, FALSE, TRUE. In other words, no two Boolean combinations can lead to the same case, seminar.

    ~ Mario

    You need to remodel your table 2D to 1 d first.

    Now, assuming that you have the items in table 64 less thant, "boolean array to the number" will give you a unique number for each possible combination of bit.

    M_Mario_M wrote:

    I tried to use the Boolean to the number, but I need a way to differentiate between B1 = B2 = FALSE and B1 = B2 = TRUE, FALSE, TRUE.

    As mentioned, each combination will give you a different value. You must simply ensure that you Add unique cases for each number. Add as many cases you want to structure your business. If you do not, several models of trigger default case-sensitive.

    If your problems persist, please contact your code.

  • Through the sum of the values in all of the array of Boolean one and zeros

    Hello.

    I have an array of Boolean which I have converted one and zeros. I just want to the sum of all the elements in this table (in other words, giving the number of 1 in the table). I used the feature to add items, but I get a negative value. I checked there were not all values except one and zero (I know it shouldn't be) using max and min. I don't know how a negative value has been calculated - any ideas.

    Thanks in advance

    Before adding elements, convert the table I32 or I64. The output of the primitive add-on is of the same type that the entry and if the entry is an I16, then you cannot have a value greater than 32,767 or value will wrap around (what happened in your case.

  • Can I link an LED on front panel for a specific element in an array of Booleans?

    In LabVIEW 2010, I have a string of LED. I and array of boolean values that contain the values that the LEDs have to indicate.

    What is the best way to connect the LEDs to elements in the array of Booleans?

    Can I link an LED on front panel for a specific element in an array of Booleans?

    How this is done?

    Can someone show the code example?


  • ASC file in 2D array of Boolean

    Hey guys,.

    I was wondering if there is a method to download a *. CSA or *. DAT file to convert it to an array of Boolean 2D.

    For example, I would create a .asc or .dat file composed of strings using MATLAB to generate

    1 1 0 1 1 0 1 1

    0 1 0 0 1 0 0 1

    1 0 0 1 0 0 1 0

    and it would be to convert the string to an array of Boolean 2D of

    T T F T T F T T

    F T F F T F F T

    T F F T F F T F

    while I can ultimately use it to create a digital waveform graph changed like this:

    The goal is because I use the sampling frequencies of 0.1 second interval that spans 2-5 minutes.

    So to summarize:

    1. download a *. CSA or *. DAT file with a 2-D array of strings

    2 convert the file to create a Boolean matrix 2D to use create digital waveforms

    Any help will be appreciated. I know it's not much but I downloaded the table 2D to waveform *.VI for testing purposes.

    sdkpark wrote:

    However, when I tried first, he doesn't know how to separate each column in the *.asc file

    1 0 0 1 0 0

    0 1 1 0 1 1

    It turns out only to read the first column

    Please attach your VI instead of an empty image of sense.

    Reading spreadsheet file will read all the data if used 2D correctly. The defined delimiter is separating the elements and line break between the lines. For example, if you do not wire the delimiter, it will assume "tab" and that a single value is read by line if it's actually a space character. Try a delimiter of the 'space '.

  • Is it possible to an array of Boolean function number in a case without the table of Boolean structure?

    Hi guys! In my program, my "robot" (lego mindstorms EV3) has essentially read a code bar and do different things according to the codes bar, he reads and so I have an array of Boolean, and basically I need compare to the other Boolean tables. First of all, I used the "Boolean chart at number" function and then just put it in a structure of the case, but it turns out that the Boolean value to number function is not compatible with my Lego EV3 brick, so I have to find another way to do this. Any ideas?

    Help is appreciated! If you have any questions or if my question is confusing, just ask!

    Thank you.


  • Doubling of the size of the array of Boolean 2D

    Hello.

    I have an array of Boolean 2D 20 x 20 and you need to convert that into a Boolean 2D table 40 x 40. If the first element of the array 20 x 20 is a 1, the first two elements of the first and the second line of the table 40 x 40 must be a 1 as well.

    Thanks in advance!

    Or similar to the other thread:

    I made it smaller, but the code remains the same...

  • How to assign array of Boolean values in LabVIEW?

    I want to assign array of Boolean values. IAM not able to do. For each Boolean I want to assign each value. Please help me...

    Thank you Mr President... He worked.but I'm stuck with the other problem.i created a 4-page tab control. How is it possible to change the 1 tab to Page 2 and page 3 page, etc. by using a Boolean control?

  • Random 2D array of Boolean

    I'm trying to chance an array of Boolean values, and for reason any I succumbed

    I managed to makine lines at random, but I want the whole range to be random

    added to this I put a number of array of bool.

    Thank you

    Table initialization function will give you the same value for all items. It is documented in help. For example, you cannot use this way. You can simply use two loops so you generate a random number for each element of your 2D array. I do not understand what you say about the number of table of Boolean, or why you using same. If you use the 2-loop approach, all you need to do is decide what you consider a "1". For example, you might say that something greater than 0.5 is a '1 '. This can be done with a single superior? function. Note that this should be done inside the loop.

    An alternative is to use the continuous random function to obtain an array of random numbers that you can remodel in a 2D array. You must decide if the distribution provided by this function is "random".

    You try to create a sort of random communication signal?

  • Position of the element in the array of Boolean

    Hello

    I have an array of Boolean, whose elements are initialized to false. For example,.
    private boolean array[] = new boolean[10];
    Subsequently, I put an element of the array to true. Let's say that
    array[5] = true;
    My question is how can I get the position of the whole of the element whose: value (s) was/is real? Is there a method that does this? I looked in the class of paintings, but could not find anything.

    Thanks in advance.

    There is no built-in function. Just write the code yourself, it is not difficult. Simply iterate on the table and when you find a true value, you have found your index.

  • Remove the equidistant indices into an array

    Hi all

    I have a performance problem. In my code, I use two nested for loops. Externally, runs 500 times each time. Rather, an internally executes once for every pixel that I find in an outline to a picture. Number can range from 10 to 1000. And 500 x 1000 is a large number of iterations. In addition, the difference between the e pixels is minimal, I needn't pixel to build an outline.

    So I thought to leave only 50 pixels to define a contour and whenever I get a certain number of pixels, the vi "remove table" allows to reduce the amount of pixels at 50. But I would avoid for loops, because computational cost would increase even if I need to go on the entire table. For example, if I have 20 pixels, and I want to reduce them to 10, I would choose index 1, 3, 5, 7, 9, 11, 13, 15, 17, 19.

    I don't know if this is possible. Can you help me please?

    I cheked this post:

    http://forums.NI.com/T5/LabVIEW/removing-a-list-of-indices-from-an-array/TD-p/572652

    but this isn't the same problem he uses for loops, in fact, I would say that mine is easier to solve and perhaps very banal, but I can't find a solution.

    Thanks in advance.

    Using Index table inside a loop will produce the results you want and can work quickly enough.  The attached VI selects an item in each element of the 'period '.  For testing purposes, I have two tables, one random DBL and another of sequential I32. The array of integers allows a quick check you get the tables you want.

    When it is used as a Subvi with closed Panel, this averaged 33 microseconds with 1000 pixels and periods of 50 or 100 tables.  The loop Tester ran ~ 200000 iterations before I stopped to check the timing.

    This corresponds to about 17 ms for your configuration of 500 x 1000.

    Lynn

  • Cannot remove the old patterns TMSPE

    I'm trying to clean up some TMSPE ofld schemes that we use more, but I get the following error:

    I got a model to this survey scheme, but deleted first.  I have 5 old patterns that I am trying to delete, and I get this error on them all.  If I can't delete them, this is no big deal, especially just a gene, as over time, the list would eventually accumulate if I can't delete them.

    TMS 14.2.2

    TMSPE 1.1

    Update of Java 7 21

    Thank you

    Hi Patrick

    It seems that you could hit the bug: CSCug48583

    Sometimes when you import that a video Jabber allows of say 4.4 and 4.5. At this point, you can delete them both. However, if you create a template for the 4.4 and attempt to remove 4.5, you will get this error.  Bascially that all models of all versions of a specific device must be removed before the scheme can be removed.

    It s a bug, but no fix version is still defined.

    / Magnus

Maybe you are looking for