Shift of the bits in an array

Hello

I am a student in Electromechanics in Belgium and I do a simulation of an explosion with 48 leds for my final project.

In the attachment, you can see the program that I have already written. I think that this can be done more easily, but I don't know how.

I cut out 48 leds in 2 tables, with each table 24 LED.

If you see the program you will understand actually the best way to do this is to shift bits, but I don't know how it can be done in LabVIEW.

I have to expand my program so it would be nice if I could just let you what to get a better overview.

So what I would like to know, can I shift "bits" as you can see the leds burning in following VI?

It must be possible to set the number of bits that are '1' and movement speed.

3 bits at a time:

(1) 1110 0000 0000.

(2) 0111 0000 0000.

(3) 0011 1000 0000.

(4) 0001 1100 0000.

5bits both:

(1) 1111 1000 0000.

(2) 0111 1100 0000.

(3) 0011 1110 0000.

(4) 0001 1111 0000.

Thank you


Tags: NI Software

Similar Questions

  • Array.Shift () sets the target table AND any referenced by table

    I have a class that creates an array from a xml configuration file.  I put a variable private in this class and that you use a getter in other classes to access the table.

    the routine that uses the table does the following:

    -call the getter and assign the value returned to a local variable tmpArray (private).  the Get accessor is a simple return() by using a value that is created in the constructor.

    -use a loop for itterate on content

    -use array.shift () to the element pop tmpArray

    the next time I run the routine, the content of the table is empty.  I use the getter similarly.  I've implemented the getter when I tried to manage the two tables in the same class, thinking that as long as the original array has been private (I also tried static), that wouldn't change the value.  I have since got around the problem by movine routine that fills the original value of the manufacturer, to the Get accessor.

    then, consider the following code:

    import flash.events.Event;

    btn.addEventListener ("click", btnHandler);

    var monTableau = new Array();

    var myTmpArray = new Array()

    MonTableau is ['one', 'two', 'three'];.

    myTmpArray = myArray;

    function btnHandler(evt:Event)

    {

    for (var i in myTmpArray)

    {

    trace ("myTmpArray.length:" + myTmpArray.length);

    trace ("myArray.length:" + myArray.length);

    myTmpArray.shift ();

    trace ("myTmpArray.length:" + myTmpArray.length);

    trace ("myArray.length:" + myArray.length);

    }

    }

    This returns:

    myTmpArray.length: 3

    myArray.length: 3

    myTmpArray.length: 2

    myArray.length: 2

    myTmpArray.length: 2

    myArray.length: 2

    myTmpArray.length: 1

    myArray.length: 1

    If I create a variable myVar and set it to 1 then set myOtherVar = myVar equal both the same value

    If I change the value of myOtherVar, myVar is not affected.

    but using the shift() method changes the original and the copied table.

    myTempArray IS NOT a copy of myArray but REFERENCE to is - shift() so affect them both.

  • How to read the bits of the file?

    Hello everyone,

    I am a beginner in LabVIEW. I need to get the bits of the file, but I don't know how I can do it. I use the example of 'Read Binary File VI' the help of LabVIEW, but it returns table DBL. And for a long time, I can't find a way to convert this table to table to bits. Can anyone help me? Thanks in advance.

    It is a very vague question. A file is nothing more than a long string of bits, so you could simply read a string and analyze the bits you like. I don't know how you do what they

    One possibility would be to cast to an array of U8, then use 'number of boolean array' in an autoindexing FOR loop, followed by the fitness in an array of Boolean 1 d. You can also format the U8% 08 b and concatenate the strings. There is no "official" way to represent the "bits" to the human observer.

  • Shift of the computer where the game

    I have a shift of the computer when you play video games - not just an individual, but many different did the same thing.  It is not just in game lag, all the programs I'm running are jerky and lagging.  I've defragged, made checks the registry, scan the disks for errors, run spyware, antivirus and other cleaning products.  I've updated direct X and drivers, and it has not changed.  I am running windows vista Home premium 32-bit.  My graphics card is a NVIDIA GeForce 9400 GT.  There is nothing that happens in the game which requires it, as happens in many different and only sporadically gets lag for words to a one hour min 30secs, then stops - so does again and again, and I can't figure out how to make it stop.  Any help would be appreciated.

    Do not use the above (Gamebooster), it is not necessary unless your computer is complete garbage, DWM is disabled before your games any load and SHdetection service is one that you do not want to stop.

    When you load your game, what is your CPU usage? If it is doped to 99%, and for the post above you saying 9400 GT is not a gaming card, Yes, it's not but that these games should not be a problem, what would be the problem is your 32-bit processor which is the dual core 2.6 GHz, if your CPU usage is doped with 99% (which can lead to the limitation that slows down your CPU Temp than vice versa as is the case) (, may be the cause of the "spikey 30-1 min lag'), the processor would be at fault, first I open my case and"dust-free", he can start my games, then if nothing seemed to work I would look in the replacements of material for your CPU especially look for a core2duo or higher for 3D games effective

    Josh Luitjens - self-taught computer Techhttp://www.pchalp.com/

  • Hi all, I bought apple phone I 5s recently is the power button / stop does not. Bought in the United States, but I was shifted to the India, the works of will to guarantee in India please help

    Hi all, I bought apple phone I 5s recently is the power button / stop does not. Bought in the United States, but I was shifted to the India, the works of will to guarantee in India please help

    Ask an authorized service provider regarding iPhones, a guarantee of a country may or may not be honored in another function where you take the device.

    (143868)

  • Just upgraded to 32.0.1 and drop down menus were shifted to the left. How can I fix this?

    I just upgraded to 32.0.1 for Mac, and from the drop down menus were shifted to the left. I tried to reset. I tried to reset Firefox and the problem was not resolved.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe

    You can check for problems caused by plugins and all the plugins to "Ask to activate" on the page "Firefox/tools > Modules > Plugins" (plugins are not affected by the Mode of Firefox safe)

  • Only 1 page print well. Page 2 is shifted to the right, and the information is lost in the page break. FireFox 8 and 9, Mac OS 10.6.8

    Mac OS 8 and 9 FireFox 10.6.8
    If I print a web page, all simply to print or save to PDF, only the first page prints fine. Page 2 is shifted to the right, such as the information is cut on the right edge. Information is lost in the page break, several lines of text will be lost. If I need to print a page, I open Safari, which does a very nice job of formatting of the page for printing. But I want to use FireFox. Can you help me?

    The problem persists if start you Firefox in Mode safe? http://support.Mozilla.com/en-us/KB/safe+mode

    What is with an empty profile? http://support.Mozilla.com/en-us/KB/basic%20Troubleshooting#w_8-make-a-new-profile

    If it happens in the two safe mode and with a new profile, please post the content of about: support

  • alignment has shifted to the right

    I use firefox 5.0.1. Since yesterday, it seems that the alignment of firefox is shifted to the right. all websites have evolved to the right and do not display properly. Also all the tabs do not appear on the screen. They do not fit as the number of tabs is increasing.
    I installed quick time yesterday and it seems the problem started after that. I uninstalled quicktime and reinstalled firefox. I installed the old version of firefox and it worked very well, and Web sites were displayed properly. But later I upgraded again to 5.0.1 version and the problem comes back. Can someone help?

    This problem may be caused by the extension of the toolbar of Babylon 1.1.8

  • Satellite L850: Problem ATI - screen shifts to the right once I wake it up

    Hello

    I'm basically looking for some more information about the next version of the video drivers.

    For more information about this, please see the article below:

    http://forums.Toshiba.com/T5/video-display/screen-shifted-to-the-right/TD-p/432195

    I m afraid person here can help you with this info. You have EMEA or OUR model of laptop?

  • How to replace (assign) a part of the elements of an array in TestStand?

    Hello

    I would like to replace or assign values to the elements of an array.

    For example, I have a local variable with 6 elements, Locals.A = {1, 2, 3, 4, 5, 6},

    and I would do it is {1, 2, 13, 14, 5, 6}.

    Accordingly, I add an expression and write "Locals.A [2.3] = {13: 14}", but it failed.

    Is it possible to replace a part of a painting?

    My real question is I want to pass parameters to a sequence to a local variable of the MainSequence, like the picture as an attachment.

    I hope that I can assign the parameter (table 5 elements) for the range of 5th to 9th item of the local Variable.

    Could someone give me any suggestions? Thank you very much!

    (1) I meant move the entire table and in the subsequence programmatically update only a subset of the items.

    For 1 or 2, you'd have to write a loop as interates on and updates the items that you are interested in. There is no simple syntax that will do what you want. You can use a loop but, rather than make a statement of entitlement for each item.

    -Doug

  • "The String to Byte Array" and its operations on-site (memory) of twins "Byte Array to string"? (or if they incur sentence of copy/memory operation?)

    I can't deduct the answer to this question (topic/post title) of the help of LabVIEW on the functions.

    Intuitively, it seems that the two representations of data are equal to the memory and so goes between the two should essentially be a no-op when the code is compiled... but is it? (assuming that the length of the array of strings/remains constant, can I go back repeatedly without performance?)

    As a string of LabVIEW is a handful and any other type of data except tables aren't a handful; that implies to me that a string = U8-table-grip handle and so a string into an array of U8-could be a memory or inefficient operation since no conversion actually take place?

    The reason I ask, is that when you work with for example TCP Read or read VISA, 'data' reading is always a string, but according to what you are doing, this string is often more efficiently processed/interpreted if converted to an array of U8 and I just want to know if (memory and CPU point of view) I can move freely between the chain and U8 array and return depending on what format is most appropriate to a point?

    (Also, I'm at this stage fairly certain that the "array of strings of bytes" is cleaner AND more efficient than a type-cast to an array of U8 strin... but I could be wrong.)

    I did some tests on this just now, and my conclusion is that it is completely in place. The local users group had a coding challenge when this became relevant to my solution.

  • Setting the size of the font of an array of strings programmatically

    I can't find the correct property to programmatically adjust the size of the font of an array of strings.  For a chain, it is quite easy with a property node and the text. FontSize property.  There must be a similar property to an array of strings, but I'm not.  Can anyone help?

    Take the element ref table and class type a more specific (string) and then you can set with a property node's font size.

  • How to read the BIT of SQL Server value in CVI

    Hello

    I try to get a value of SQL Server 2005 (ture or false) bit in CVI (with SQL toolkit). I use the DBBindInt, but overall the return value is - 1.

    How can I get the real value of SQL?

    Thanks for your help

    Region

    Do you mean that you never receive the value FALSE, IE 0? Or you expect a TRUE value to be exactly 1? It is very common for TRUE to be represented as -1; If you are concerned just hide all the bits in the value returned with the exception of bit 0 - this will then give your alternative 0/1.

    JR

  • multiplying the elements of an array with their index

    How can I multiply the elements of an array with their index values.

    Thanks in advance.

    Hi aksoy,.

    Multiply the elements with their index:

  • export by programming a zone selected the table in an array of strings

    I am able to select an area of a table programmatically using selstart and property nodes selsize, but once I have selected area I can't export the data into an array of strings. proven value property node. Returns all of the data, not the data, I am interested in. help very much appreciated.

    Hi eword.

    You can use "Subset of the table" to get the part you're looking for.

    Mike

Maybe you are looking for

  • Daisy chained multiple external hard drives

    Can I split my files pictures to several external hard drives.  My iMac is completed and I am on a budget.  I found a good deal on 500 GB FireWire external drives.  My library approaching the 500 GB and if I put it on an external drive and Garland a

  • iMac SSD

    Hello! I want to know. Mounted iMac SSD (new), it connects via SATA and PCI-E?

  • Sort by flags in Mail 9.1 does not

    I used intensively flags to help me separate emails for different projects. It worked well in Mail 5.3 on my old Mac Pro, but on my new Mac with El Capitan (Mail 9.1 - 3096.5), sorting by the indicator does not work. I don't see a model to order the

  • AutoScale after Zoom Pan and change the axis interval

    I'm trying to connect the axes x many ScatterGraphs and I was wondering how to restore the graphics to their original point of view drawn once a user has made a lot of zoom, pan and axis range chages.  Basically how do you perform an autoscale on one

  • Scanner to the computer

    I have a C-3180 all-in-one. My computer using Windows7 home premium operating system. I would like to know how to scan a picture and sent it to my computer instead of printing a copy. I have an old photo, I want to share with family and friends, but,